Commit 88de90f8 authored by Mike Nichols's avatar Mike Nichols

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.
parent 7445ea6c
...@@ -26,7 +26,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider ...@@ -26,7 +26,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
/** /**
* Get a list of all of the failed jobs. * Get a list of all of the failed jobs.
* *
* @return array * @return object[]
*/ */
public function all() public function all()
{ {
...@@ -34,7 +34,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider ...@@ -34,7 +34,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
$all = array_map(function ($job) { $all = array_map(function ($job) {
$job['id'] = (string) $job['_id']; $job['id'] = (string) $job['_id'];
return $job; return (object) $job;
}, $all); }, $all);
return $all; return $all;
...@@ -44,7 +44,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider ...@@ -44,7 +44,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
* Get a single failed job. * Get a single failed job.
* *
* @param mixed $id * @param mixed $id
* @return array * @return object
*/ */
public function find($id) public function find($id)
{ {
...@@ -52,7 +52,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider ...@@ -52,7 +52,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
$job['id'] = (string) $job['_id']; $job['id'] = (string) $job['_id'];
return $job; return (object) $job;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment