-
Notifications
You must be signed in to change notification settings - Fork 1.4k
artisan queue:retry all doesn't work #1560
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
Comments
Having this same issue. php-mongodb version is 1.5.1
I can provide exceptions as well if needed.
If I put the RabbitMQ ServiceProvider before the other two, then RabbitMQ stops working in Lumen. Not sure if I need the MongodbQueueServiceProvider to make the failed jobs work though. Currently it can add failed jobs, but not process them. Since I have to release soon, I will go back to MySQL temporarily, but would very much appreciate help with this issue. I'll provide help if necessary to fix this bug. |
did you find any solution to this i have the same problem |
We have same issue with Laravel 5.8 & jenssegers/mongodb 3.5.1. |
I'm seeing the same issue, this is with the custom service provider in place. The full stack trace is:
Using Laravel 5.7 |
Exploring this a bit more. This may be because we had failed jobs lodged before we had implemented the custom service provider. We'll try clearing our existing failed jobs and see if new failed jobs that have been lodged with the custom service provider are able to be replayed. If so, I'll report back and I think you'll be able to close this ticket. |
@Rodeoclash I think the issue is because failed_at in mongo is not anymore a timestamp, but a carbon object: In laravel it works like a charm, but not in Lumen, I think the problem would start from here vendor/jenssegers/mongodb/src/Jenssegers/Mongodb/MongodbQueueServiceProvider.php |
Experiencing the same issue here with Lumen 6.0 and jenssegers/mongodb 3.6 @ionutraducanu is correct, this is due to the failed_at timestamp. It is probably better to resolve this by changing how we are saving the failed_at field, but I was able to patch the commands for now by implementing a custom MongoFailedJobProvider which overrides the all() method. I can confirm after implementing this, all artisan queue commands work as expected.
|
The problem occurs because of the way lumen loads service providers, it is necessary to assemble the queue before registering MongodbQueueServiceProvider. This works in a similar way to using email queues in the lumen where we should do the following:
|
I got the solution to this issue, would you still like it posted? If yes, please answer this issue and I will send here the necessary files for change and I will open a pull request to add the solution in the repo. |
I've just come across this with Laravel 11. A quick workaround is to jump in to artisan tinker and run:
This will push all the failed jobs back into the queue. Not ideal, but it works! |
I've an open PR to fix this issue: #2838 |
Fixed by #2838 (to be released in 4.3) |
Nice work @GromNaN ! Thanks |
"jenssegers/mongodb": "^3.4"
artisan queue:retry all
Does not find any failed jobs even when there are some present.
Error: No failed job matches the given ID [].
The text was updated successfully, but these errors were encountered: