Answer the question
In order to leave comments, you need to log in
Sidekiq confusing environments?
There are two environments: staging and production. Spinning physically on one machine.
No additional sidekick settings were made.
The problem is that each of the sidekicks takes a job from the queue and tries to execute it in its own environment, regardless of which environment it was created from. Accordingly, jobs fail due to the lack of the necessary data in the database.
Jobs are created just like baby.delay_for(9.months).born Is that
how it should be by default? How can I split the queues? Use different databases or different queues?
Answer the question
In order to leave comments, you need to log in
It's decided.
Sidekiq.configure_server do |config|
config.redis = { :url => 'redis://localhost:6379', :namespace => Rails.env }
end
Sidekiq.configure_client do |config|
config.redis = { :url => 'redis://localhost:6379', :namespace => Rails.env }
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question