Reputation: 534
I'm using Lumen queues. To start the jobs being processed, the docs indicate to run the queue listener from the command line like so:
php artisan queue:listen
I'd like to trigger my queue jobs processes directly from my code. How to do so?
Upvotes: 3
Views: 1183
Reputation: 220066
You can call any artisan command you like directly from your code:
Artisan::call('queue:listen');
For information, read the docs.
Upvotes: 2