Open v4mp1re opened 5 months ago
Hi @GromNaN, I worked on this issue for a couple of hours and found out the MongoDBQueueServiceProvider
class and other related classes are removed in version 5,x. what's going on? currently, does the laravel-mongodb
package support queues?
PS: the documentation needs an update.
The queue mechanism is still supported. The custom connector is registered in MongoDBServiceProvider
The custom FailedJobProvider
was removed because it was a copy of DatabaseFailedJobProvider
with specific transformations id/_id
, object/array
and Carbon/UTCDateTime
that are now done by default by MongoDB Query Builder in version 5.
@v4mp1re doesn't tell in which laravel-mongodb version is the issue. I think it was fixed in version 4.3 by https://github.com/mongodb/laravel-mongodb/pull/2838
Description:
When queue:retry is run it returns Unable to find failed job with ID [] error for each items in queue.
Steps to reproduce
Expected behaviour
Failed jobs should be queued back to jobs table
Actual behaviour
Retrying fails. in Queue:retry command
$ids = method_exists($failer, 'ids') ? $failer->ids($queue) : collect($failer->all()) ->where('queue', $queue) ->pluck('id') ->toArray();
the failer provider is MongoDB\Laravel\Queue\Failed\MongoFailedJobProvider::class which extends Illuminate\Queue\Failed\DatabaseFailedJobProvider::class .
MongoFailedJobProvider::class does not override DatabaseFailedJobProvider::class's ids() function. The ids function is implemeted based on the myssql which tries to get 'id' of the failed job instead of '_id' in the case of Mongodb