You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if I have found a bug or if this just a case of user error.
I am having an issue with running multiple workers on long running jobs (~20 minutes).
When add a message into the queue and then start 2 workers using the following command bin/cake worker -c process-invoices -p process-invoices
Initially, 1 worker will begin to process the job. However, after about 5 minutes, the other worker also begins to start working on the same job.
I have set $maxAttempts = 1 in the job class.
Next, I tried to bind each processor to an unique name bin/cake worker -c process-invoices -p process-invoices1
and bin/cake worker -c process-invoices -p process-invoices2
The message is only picked up by 1 worker, however if another message gets added to the queue, the other worker receives the following error:
[LogicException] Processor was not found. processorName: "process-invoices2" in /var/www/html/vendor/enqueue/enqueue/ArrayProcessorRegistry.php on line 33
And when I don't bind the processor name and run the following command twice to create 2 workers bin/cake worker -c process-invoices
I receive a similar error:
error: [LogicException] Processor was not found. processorName: "Cake\Queue\Queue\Processor63e2a1884f1c4" in /var/www/html/vendor/enqueue/enqueue/ArrayProcessorRegistry.php on line 33
I am unable to figure out a method of having multiple workers without the errors or re-processing jobs.
Is there any config setting (visibility timeout) that I am missing to resolve my issues?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
I'm not sure if I have found a bug or if this just a case of user error.
I am having an issue with running multiple workers on long running jobs (~20 minutes).
When add a message into the queue and then start 2 workers using the following command
bin/cake worker -c process-invoices -p process-invoices
Initially, 1 worker will begin to process the job. However, after about 5 minutes, the other worker also begins to start working on the same job.
I have set
$maxAttempts = 1
in the job class.Next, I tried to bind each processor to an unique name
bin/cake worker -c process-invoices -p process-invoices1
and
bin/cake worker -c process-invoices -p process-invoices2
The message is only picked up by 1 worker, however if another message gets added to the queue, the other worker receives the following error:
And when I don't bind the processor name and run the following command twice to create 2 workers
bin/cake worker -c process-invoices
I receive a similar error:
For reference, the config for the queue is:
I am unable to figure out a method of having multiple workers without the errors or re-processing jobs.
Is there any config setting (visibility timeout) that I am missing to resolve my issues?
Thanks!
The text was updated successfully, but these errors were encountered: