Answer the question
In order to leave comments, you need to log in
How to work with background tasks on the server?
I've been struggling for a long time and can't deal with background tasks on Rails. As I understand it, there is no point in deploying a more or less costly application to Hiroku (if there are more than one task), or am I wrong?)
Second, how to implement this using sidekiq? Is there any guide on setting it up on a remote server or on the same Heroku?
My experience with Heroku is not entirely successful, when you run through the console bundle exec sidekiq
it automatically starts all available workers, how to deal with this? Or do you not even need to do this, but just call the worker through rake or the application controller?
Answer the question
In order to leave comments, you need to log in
Sidekiq works like this: you run it on the server, it raises a given number of workers and waits until new tasks appear. That is why such tasks are called background tasks.
If you do not want it to run all the workers, then you need to specify the name of the queue in the workers and run a sidekick to process only this queue sidekiq -q queue_name (see sidekiq --help)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question