1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

fixes #928 example of using sidekiq with whenever without loading rails

This commit is contained in:
didil 2013-05-16 22:03:37 +01:00
parent af649c28d5
commit 83f6e863b6

View file

@ -35,3 +35,13 @@ end
every :hour do # Many shortcuts available: :hour, :day, :month, :year, :reboot
runner "HourlyWorker.perform_async"
end
# Using the runner command loads an extra rails instance
# If you want to avoid this you can use the sidekiq-client-cli gem which is a commmand line sidekiq client
# Define a new job_type
job_type :sidekiq, "cd :path && RAILS_ENV=:environment bundle exec sidekiq-client :task :output"
# Add the worker to the queue directly
every :hour do
sidekiq "push HourlyWorker"
end