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
Post a Comment