php - Laravel sync job and specific queue on the same command? -


i want dispatch new job on specific queue connection, thing want run right away (sync) on local machine.

example:

$job = ( new \myjobclass() )->onconnection('sqs2-connection'); dispatch( $job ); 

how can make sure job run sync on local env?

found solution:

$job = ( new \myjobclass() )->onconnection( env('queue_connection_2','sync') ); dispatch( $job ); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -