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 'app/workers')
-rw-r--r--app/workers/all_queues.yml9
-rw-r--r--app/workers/background_migration/single_database_worker.rb5
-rw-r--r--app/workers/database/batched_background_migration/execution_worker.rb2
-rw-r--r--app/workers/database/batched_background_migration/single_database_worker.rb2
-rw-r--r--app/workers/namespaces/in_product_marketing_emails_worker.rb33
5 files changed, 8 insertions, 43 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index fc73a3b0cbc..94b9acbc48b 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -579,15 +579,6 @@
:weight: 1
:idempotent: true
:tags: []
-- :name: cronjob:namespaces_in_product_marketing_emails
- :worker_name: Namespaces::InProductMarketingEmailsWorker
- :feature_category: :experimentation_activation
- :has_external_dependencies: false
- :urgency: :low
- :resource_boundary: :unknown
- :weight: 1
- :idempotent: false
- :tags: []
- :name: cronjob:namespaces_prune_aggregation_schedules
:worker_name: Namespaces::PruneAggregationSchedulesWorker
:feature_category: :source_code_management
diff --git a/app/workers/background_migration/single_database_worker.rb b/app/workers/background_migration/single_database_worker.rb
index 2f797a24468..56800c03bbb 100644
--- a/app/workers/background_migration/single_database_worker.rb
+++ b/app/workers/background_migration/single_database_worker.rb
@@ -45,7 +45,10 @@ module BackgroundMigration
# lease on the class before giving up. See MR for more discussion.
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45298#note_434304956
def perform(class_name, arguments = [], lease_attempts = MAX_LEASE_ATTEMPTS)
- unless Feature.enabled?(:execute_background_migrations, type: :ops)
+ should_skip = Feature.enabled?(:disallow_database_ddl_feature_flags, type: :ops) ||
+ Feature.disabled?(:execute_background_migrations, type: :ops)
+
+ if should_skip
# Delay execution of background migrations
self.class.perform_in(BACKGROUND_MIGRATIONS_DELAY, class_name, arguments, lease_attempts)
diff --git a/app/workers/database/batched_background_migration/execution_worker.rb b/app/workers/database/batched_background_migration/execution_worker.rb
index 1bdc829418a..75798f0ab73 100644
--- a/app/workers/database/batched_background_migration/execution_worker.rb
+++ b/app/workers/database/batched_background_migration/execution_worker.rb
@@ -64,6 +64,8 @@ module Database
attr_accessor :database_name, :migration
def enabled?
+ return false if Feature.enabled?(:disallow_database_ddl_feature_flags, type: :ops)
+
Feature.enabled?(:execute_batched_migrations_on_schedule, type: :ops)
end
diff --git a/app/workers/database/batched_background_migration/single_database_worker.rb b/app/workers/database/batched_background_migration/single_database_worker.rb
index ebf63d34cbf..f73f8fd751b 100644
--- a/app/workers/database/batched_background_migration/single_database_worker.rb
+++ b/app/workers/database/batched_background_migration/single_database_worker.rb
@@ -27,6 +27,8 @@ module Database
# :nocov:
def enabled?
+ return false if Feature.enabled?(:disallow_database_ddl_feature_flags, type: :ops)
+
Feature.enabled?(:execute_batched_migrations_on_schedule, type: :ops)
end
diff --git a/app/workers/namespaces/in_product_marketing_emails_worker.rb b/app/workers/namespaces/in_product_marketing_emails_worker.rb
deleted file mode 100644
index 470fba1227d..00000000000
--- a/app/workers/namespaces/in_product_marketing_emails_worker.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-module Namespaces
- class InProductMarketingEmailsWorker # rubocop:disable Scalability/IdempotentWorker
- include ApplicationWorker
-
- data_consistency :always
-
- include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
-
- feature_category :experimentation_activation
- urgency :low
-
- def perform
- return if paid_self_managed_instance?
- return if setting_disabled?
-
- Namespaces::InProductMarketingEmailsService.send_for_all_tracks_and_intervals
- end
-
- private
-
- def paid_self_managed_instance?
- false
- end
-
- def setting_disabled?
- !Gitlab::CurrentSettings.in_product_marketing_emails_enabled
- end
- end
-end
-
-Namespaces::InProductMarketingEmailsWorker.prepend_mod_with('Namespaces::InProductMarketingEmailsWorker')