Commit 74c53ef6 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'remove-background-migration-worker-feature-flag' into 'master'

Remove feature flag from BackgroundMigrationWorker

See merge request gitlab-org/gitlab-ce!21404
parents c691e07a e951a15c
...@@ -10,17 +10,7 @@ class BackgroundMigrationWorker ...@@ -10,17 +10,7 @@ class BackgroundMigrationWorker
# maintenance related tasks have plenty of time to clean up after a migration # maintenance related tasks have plenty of time to clean up after a migration
# has been performed. # has been performed.
def self.minimum_interval def self.minimum_interval
if enable_health_check? 2.minutes.to_i
2.minutes.to_i
else
5.minutes.to_i
end
end
def self.enable_health_check?
Rails.env.development? ||
Rails.env.test? ||
Feature.enabled?('background_migration_health_check')
end end
# Performs the background migration. # Performs the background migration.
...@@ -86,8 +76,6 @@ class BackgroundMigrationWorker ...@@ -86,8 +76,6 @@ class BackgroundMigrationWorker
# class_name - The name of the background migration that we might want to # class_name - The name of the background migration that we might want to
# run. # run.
def healthy_database? def healthy_database?
return true unless self.class.enable_health_check?
return true unless Gitlab::Database.postgresql? return true unless Gitlab::Database.postgresql?
!Postgresql::ReplicationSlot.lag_too_great? !Postgresql::ReplicationSlot.lag_too_great?
......
---
title: Remove health check feature flag in BackgroundMigrationWorker
merge_request:
author:
type: changed
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