Skip to content

Commit 43a41ea

Browse files
committed
Updated DatabaseFailedJobProvider
Updated DatabaseFailedJobProvider to return object(s) instead of arrays as defined by the FailedJobProviderInterface. Fixes a bug that caused queue:retry to fail when using mongodb for failed jobs.
1 parent 7405136 commit 43a41ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Jenssegers/Mongodb/Queue/Failed/MongoFailedJobProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ public function log($connection, $queue, $payload, $exception)
2626
/**
2727
* Get a list of all of the failed jobs.
2828
*
29-
* @return array
29+
* @return object[]
3030
*/
3131
public function all()
3232
{
3333
$all = $this->getTable()->orderBy('_id', 'desc')->get()->all();
3434

3535
$all = array_map(function ($job) {
3636
$job['id'] = (string) $job['_id'];
37-
return $job;
37+
return (object) $job;
3838
}, $all);
3939

4040
return $all;
@@ -44,15 +44,15 @@ public function all()
4444
* Get a single failed job.
4545
*
4646
* @param mixed $id
47-
* @return array
47+
* @return object
4848
*/
4949
public function find($id)
5050
{
5151
$job = $this->getTable()->find($id);
5252

5353
$job['id'] = (string) $job['_id'];
5454

55-
return $job;
55+
return (object) $job;
5656
}
5757

5858
/**

0 commit comments

Comments
 (0)