diff options
Diffstat (limited to 'app/workers/database')
3 files changed, 22 insertions, 2 deletions
diff --git a/app/workers/database/batched_background_migration_worker.rb b/app/workers/database/batched_background_migration_worker.rb index 5a326a351e8..0750ff1acaf 100644 --- a/app/workers/database/batched_background_migration_worker.rb +++ b/app/workers/database/batched_background_migration_worker.rb @@ -4,7 +4,8 @@ module Database class BatchedBackgroundMigrationWorker include ApplicationWorker - sidekiq_options retry: 3 + data_consistency :always + include CronjobQueue # rubocop:disable Scalability/CronWorkerContext feature_category :database diff --git a/app/workers/database/drop_detached_partitions_worker.rb b/app/workers/database/drop_detached_partitions_worker.rb new file mode 100644 index 00000000000..f9c8ce57a36 --- /dev/null +++ b/app/workers/database/drop_detached_partitions_worker.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Database + class DropDetachedPartitionsWorker + include ApplicationWorker + include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + + feature_category :database + data_consistency :always + idempotent! + + def perform + Gitlab::Database::Partitioning::DetachedPartitionDropper.new.perform + ensure + Gitlab::Database::Partitioning::PartitionMonitoring.new.report_metrics + end + end +end diff --git a/app/workers/database/partition_management_worker.rb b/app/workers/database/partition_management_worker.rb index c9b1cd6d261..a203c76558a 100644 --- a/app/workers/database/partition_management_worker.rb +++ b/app/workers/database/partition_management_worker.rb @@ -4,9 +4,10 @@ module Database class PartitionManagementWorker include ApplicationWorker - sidekiq_options retry: 3 include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + data_consistency :always + feature_category :database idempotent! |