File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
src/Jenssegers/Mongodb/Queue/Failed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ composer require jenssegers/mongodb
45
45
5.6.x | 3.4.x
46
46
5.7.x | 3.4.x
47
47
5.8.x | 3.5.x
48
+ 6.0.x | 3.6.x
48
49
49
50
And add the service provider in ` config/app.php ` :
50
51
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ public function find($id)
46
46
{
47
47
$ job = $ this ->getTable ()->find ($ id );
48
48
49
+ if (!$ job ) {
50
+ return ;
51
+ }
52
+
49
53
$ job ['id ' ] = (string ) $ job ['_id ' ];
50
54
51
55
return (object ) $ job ;
Original file line number Diff line number Diff line change @@ -64,4 +64,12 @@ public function testFailQueueJob(): void
64
64
65
65
$ this ->assertInstanceOf (MongoFailedJobProvider::class, $ provider );
66
66
}
67
+
68
+ public function testFindFailJobNull (): void
69
+ {
70
+ Config::set ('queue.failed.database ' , 'mongodb ' );
71
+ $ provider = app ('queue.failer ' );
72
+
73
+ $ this ->assertNull ($ provider ->find (1 ));
74
+ }
67
75
}
You can’t perform that action at this time.
0 commit comments