55use Barryvdh \Queue \AsyncQueue ;
66use Illuminate \Console \Command ;
77use Illuminate \Queue \Worker ;
8+ use Illuminate \Queue \WorkerOptions ;
89use Symfony \Component \Console \Input \InputArgument ;
910use Symfony \Component \Console \Input \InputOption ;
1011
@@ -47,13 +48,13 @@ public function __construct(Worker $worker)
4748 *
4849 * @return void
4950 */
50- public function fire ()
51+ public function fire (WorkerOptions $ options )
5152 {
5253 $ id = $ this ->argument ('id ' );
5354 $ connection = $ this ->argument ('connection ' );
5455
5556 $ this ->processJob (
56- $ connection , $ id
57+ $ connection , $ id, $ options
5758 );
5859 }
5960
@@ -62,7 +63,7 @@ public function fire()
6263 * Process the job
6364 *
6465 */
65- protected function processJob ($ connectionName , $ id )
66+ protected function processJob ($ connectionName , $ id, $ options )
6667 {
6768 $ manager = $ this ->worker ->getManager ();
6869 $ connection = $ manager ->connection ($ connectionName );
@@ -77,7 +78,7 @@ protected function processJob($connectionName, $id)
7778 $ sleep = max ($ job ->getDatabaseJob ()->available_at - time (), 0 );
7879 sleep ($ sleep );
7980 return $ this ->worker ->process (
80- $ manager ->getName ($ connectionName ), $ job
81+ $ manager ->getName ($ connectionName ), $ job, $ options
8182 );
8283 }
8384
0 commit comments