Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/sidekiq_config.rb')
-rw-r--r--lib/gitlab/sidekiq_config.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/gitlab/sidekiq_config.rb b/lib/gitlab/sidekiq_config.rb
index 7e2a934b3dd..33a15d95d22 100644
--- a/lib/gitlab/sidekiq_config.rb
+++ b/lib/gitlab/sidekiq_config.rb
@@ -57,13 +57,12 @@ module Gitlab
@cron_jobs ||= begin
Gitlab.config.load_dynamic_cron_schedules!
- # Load recurring jobs from gitlab.yml
- # UGLY Hack to get nested hash from settingslogic
- jobs = Gitlab::Json.parse(Gitlab.config.cron_jobs.to_json)
+ jobs = Gitlab.config.cron_jobs.to_hash
jobs.delete('poll_interval') # Would be interpreted as a job otherwise
- # UGLY hack: Settingslogic doesn't allow 'class' key
+ # Settingslogic (former gem used for yaml configuration) didn't allow 'class' key
+ # Therefore, we configure cron jobs with `job_class` as a workaround.
required_keys = %w[job_class cron]
jobs.each do |k, v|
if jobs[k] && required_keys.all? { |s| jobs[k].key?(s) }