diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/pages_domain_verification_cron_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pages_domain_verification_worker.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/workers/pages_domain_verification_cron_worker.rb b/app/workers/pages_domain_verification_cron_worker.rb index 92d62a15aee..60703c83e9e 100644 --- a/app/workers/pages_domain_verification_cron_worker.rb +++ b/app/workers/pages_domain_verification_cron_worker.rb @@ -5,6 +5,8 @@ class PagesDomainVerificationCronWorker include CronjobQueue def perform + return if Gitlab::Database.read_only? + PagesDomain.needs_verification.find_each do |domain| PagesDomainVerificationWorker.perform_async(domain.id) end diff --git a/app/workers/pages_domain_verification_worker.rb b/app/workers/pages_domain_verification_worker.rb index b3319ff5a13..7817b2ee5fc 100644 --- a/app/workers/pages_domain_verification_worker.rb +++ b/app/workers/pages_domain_verification_worker.rb @@ -5,6 +5,8 @@ class PagesDomainVerificationWorker # rubocop: disable CodeReuse/ActiveRecord def perform(domain_id) + return if Gitlab::Database.read_only? + domain = PagesDomain.find_by(id: domain_id) return unless domain |