-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed job not showing #530
Comments
Hmm. I've been looking into this but can't seem to reproduce it. Can you perhaps post some code and/or set up a test app? |
I'm not doing anything fancy. Just using the ShouldQueue interface on a mail class. The error that you are seeing is caused by me making a syntax error in the email markdown file to test the failed jobs tab. I'm not familiar with horizon code, and this is my first time using horizon but i suspect that this has something to do with redis and this is why. The redis command being executed to get the failed jobs is In my redis-cli if i do
I think the problem is when trying to get the failed jobs but with If you follow this call
down to
You will see that in the ajax request the query string starting_at=0, to the |
Can you try to replace line 160 with the following and see what happens?
|
That will give an error But if you check this line
You will see that similar check is there with the exception that is checking for I think that maybe the line below is the one that should change
if the starting_at is Also should change the default value to
Which does not work and return an empty set I think maybe this is the proper change (it works for me)
Note: I don't know but maybe you should also the |
Can you try this? return $this->jobs->getFailed($request->query('starting_at') ?: -1)->map(function ($job) {
return $this->decode($job);
}); |
Yeah that works as well |
Cool. I think the return $this->jobs->getFailed($request->query('starting_at', -1) + 1)->map(function ($job) {
return $this->decode($job);
}); |
Not this last one does not work. |
Ah I see, that's because it's a different method call. I'll send in a PR with the fix. Thanks for reporting. |
Hi,
So i have a failed job that is not showing on the horizon failed jobs tab. But it is showing in the dashboard
But the list of failed jobs is empty
Even though the ajax request shows the total as 1 but the jobs array is empty
And this is also a screenshot of the database
If i go to the recent jobs tab i see the failed job
And when i click on it it opens the failed job details page at this uri ".../failed/11"
I'm using
php 7.2.15
laravel 5.7.28
horizon 3.0.0
The text was updated successfully, but these errors were encountered: