Commit dac5188d authored by digitalMoksha's avatar digitalMoksha

make sure geo table exists before adding the cron jobs

parent d01fa8d0
......@@ -115,9 +115,9 @@ module Gitlab
end
def self.configure_cron_jobs!
if self.primary?
if self.connected? && self.primary?
self.configure_primary_jobs!
elsif self.secondary?
elsif self.connected? && self.secondary?
self.configure_secondary_jobs!
else
self.enable_all_cron_jobs!
......
......@@ -18,7 +18,7 @@ module Gitlab
class << self
def configure_cron_job!
destroy_cron_job!
return if Gitlab::Geo.secondary?
return if Gitlab::Geo.connected? && Gitlab::Geo.secondary?
Sidekiq::Cron::Job.create(
name: 'update_all_mirrors_worker',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment