title: Running multiple Laravel queue workers using Supervisor
body: <p>I using Laravel queues using a database driver and supervisor to keep a queue worker running all the time:</p>
  
  <pre><code>[program:laravel_queue]
  command=php artisan queue:listen --timeout=1800 --tries=5
  directory=/var/app/current
  stdout_logfile=/var/app/support/logs/laravel-queue.log
  logfile_maxbytes=0
  logfile_backups=0
  redirect_stderr=true
  autostart=true
  autorestart=true
  startretries=86400
  EOB
  </code></pre>
  
  <p>Some of the queue tasks can take around 10 minutes to complete.</p>
  
  <p>I have 2 parts to the question:</p>
  
  <p>1) How can i edit the above script to run multiple (e.g. 3) queue workers on the same queue.</p>
  
  <p>2) Is there a way of scaling the number of queue workers running based on the number of jobs waiting to be processed?</p>
  
  <p>The reason for question 2 is that we have batches of busy times and then lots of quiet times, so i don't really want to be wasting resources with 3 listeners running the whole time.</p>