1

I have two different Laravel queues in the same server. In my Supervisord.d folder I have two ini files for those queues. The job names are different in the queues. But, every time I run a job and expect the result from one queue, other queue also interferes. Here is the sample of the ini files:

[program:queue_runner]
command = php /path_to_prod/artisan queue:work --daemon --queue=default,smsInt,smsIntLow --tries=1 --timeout=30
stdout_logfile = /path_to_prod/storage/logs/supervisor.log
redirect_stderr = true
numprocs = 5
process_name = %(program_name)s%(process_num)s


[program:queue_runner_test]
command = php /path_to_test/artisan queue:work --daemon --queue=default,smsIntTest,smsIntTestLow --tries=1 --timeout=30
stdout_logfile = /path_to_test/storage/logs/supervisor.log
redirect_stderr = true
numprocs = 50
process_name = %(program_name)s%(process_num)s

Could you please help me to solve it.

G. Basu
  • 11
  • 3
  • Try to use only a queue per worker plz – dparoli Feb 19 '19 at 10:00
  • Elaborate _"other queue also interferes"_, please – Styx Feb 19 '19 at 10:02
  • For the first job I'm using "smsInt,smsIntLow" these two queues and for the second one "smsIntTest,smsIntTestLow" these are the queues. Should I remove default from those? @dparoli – G. Basu Feb 19 '19 at 10:09
  • yes, I have 5 workers in a site, each has only one queue. Try to remove also default. – dparoli Feb 19 '19 at 10:12
  • Other queues also interfere means, SmsInt and SmsIntLow are chained for queue_runner program and SmsIntTest and SmsInTesttLow are chained together for the queue_runner_test program. For the "queue_runner" job, smsInt -> smsIntTest are executing instead of smsInt->smsIntLow. – G. Basu Feb 19 '19 at 10:13
  • Tried your suggestion @dparoli. But, couldn't make it work. – G. Basu Feb 19 '19 at 10:36

1 Answers1

0

Found the solution of my problem. Though the jobs were despatching from the test site on the smsIntTest and from the other site on the smsInt queues from the beginning. But, they were getting picked up by wrong queues every time.

As the following post suggested, Why is Laravel or Beanstalkd skipping jobs?

I've assigned 'queue' => 'smsInt' in the 'connections' array of the app/config/queue.php file for one site, and 'queue' => 'smsIntTest' for the other one. This solution solved the problem.

G. Basu
  • 11
  • 3