diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/workers/database | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
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! |