Skip to content

Queue retry gets failed : Unable to find failed job with ID [] #3000

Open
@v4mp1re

Description

@v4mp1re
  • Laravel-mongodb Version: 10.0.2
  • PHP Version: 8.2.18
  • Database Driver & Version: 1.18.1

Description:

When queue:retry is run it returns Unable to find failed job with ID [] error for each items in queue.

Steps to reproduce

  1. Configure failed job with mongodb
  2. Fail a job
  3. retry failed job with php artisan queue:retry all

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions