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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -