diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2015-12-03 21:24:39 -0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2015-12-04 11:29:45 -0200 |
commit | 496870ddec632ae13cff8b5e8f6ca0bff0fa3ec7 (patch) | |
tree | 5d6cfe38c84dd1693ba7441c26f62dbff5a24e39 /config/initializers/sidekiq.rb | |
parent | 95fd79834acd41cc8bc5013bf94fd6770eb13271 (diff) | |
download | gitlab-ce-496870ddec632ae13cff8b5e8f6ca0bff0fa3ec7.tar.gz |
Migrate from Sidetiq to Sidekiq-cronfeature/sidekiq-cron
Updated Sidekiq to 3.5.x
Diffstat (limited to 'config/initializers/sidekiq.rb')
-rw-r--r-- | config/initializers/sidekiq.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index e856499732e..6e5701e33da 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -17,6 +17,12 @@ Sidekiq.configure_server do |config| chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger if ENV['SIDEKIQ_LOG_ARGUMENTS'] chain.add Gitlab::SidekiqMiddleware::MemoryKiller if ENV['SIDEKIQ_MEMORY_KILLER_MAX_RSS'] end + + # Sidekiq-cron: load recurring jobs from schedule.yml + schedule_file = 'config/schedule.yml' + if File.exists?(schedule_file) + Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) + end end Sidekiq.configure_client do |config| |