A
A
Andrey2018-04-24 15:39:00
Ruby on Rails
Andrey, 2018-04-24 15:39:00

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

2 answer(s)
V
Vladimir Kochergin, 2018-04-25
@k4ir05

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?

G
Georgy Khromchenko, 2018-04-26
@Mox

In such cases, I try to simply call the Worker from the Rails console

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question