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

Merge pull request #930 from didil/master

fixes #928 example of using sidekiq with whenever without loading rails
This commit is contained in:
Mike Perham 2013-05-16 14:32:50 -07:00
commit 3652cb8351

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