Answer the question
In order to leave comments, you need to log in
Why does the worker fall off after deployment?
After the next deployment, the sidekiq task falls off .
Error: the
file d elivery_worker.rbNameError: uninitialized constant DeliveryWorker
is
called in the controller, located in the app/workers folder , the
command says that app/workers gets into autoload.
Those. in fact now the worker is working. But only after I restarted sidekiq .
The rest of the workers do not fall off.
What could be the reason that the worker falls off? where can i look?
PS This error should work in the controller, do I understand correctly? because in the controller. Those. displayed not in the sidekiq logs, but in the application logs. DeliveryWorker.perform_async(@invoice.id)
puts ActiveSupport::Dependencies.autoload_paths
DeliveryWorker
Answer the question
In order to leave comments, you need to log in
It should not work in the controller. That's the point of asynchronous execution. It is executed by sidekiq. And the error should be in the sidekiq logs. In the controller, only a task is created for execution.
Where is this error being thrown?
In such cases, I try to simply call the Worker from the Rails console
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question