summaryrefslogtreecommitdiff
path: root/app/workers/database/drop_detached_partitions_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/database/drop_detached_partitions_worker.rb')
-rw-r--r--app/workers/database/drop_detached_partitions_worker.rb18
1 files changed, 18 insertions, 0 deletions
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