Couldn't you just specify the queues as a comma separated list in Forge, the same way you'd do it as a regular artisan command?
Create a single queue worker processing multiple queues
I'd like to use Laravel Forge to setup a single queue worker, that handles multiple queues.
When working on my local machine, I can do this using the following command:
php artisan queue:listen --queue=high,medium,low
Each of these queues are defined in config/queues.php as:
'connections' => [
'high' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'high',
'expire' => 60,
],
'medium' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'medium',
'expire' => 60,
],
'low' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'low',
'expire' => 60,
],
],
At times, this queue worker will be doing some very memory intensive tasks, which is why I'd like a single worker instead of multiple, concurrent workers (which is how I assume Forge would run each of the queue workers).
Laravel Forge lets you set multiple workers, but there is no clear indication on how a single worker can handle multiple queues.
Is what I'm asking for possible, if so, how?
Well in that case, I'd advise you to manually edit the supervisor file, located at /etc/supervisor/conf.d/worker-something. In here, the artisan command is stored. After that, run sudo service supervisord restart, or sudo supervisorctl and then reread.
Please or to participate in this conversation.