summaryrefslogtreecommitdiff
path: root/app/workers/hashed_storage/rollbacker_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/hashed_storage/rollbacker_worker.rb')
-rw-r--r--app/workers/hashed_storage/rollbacker_worker.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/workers/hashed_storage/rollbacker_worker.rb b/app/workers/hashed_storage/rollbacker_worker.rb
new file mode 100644
index 00000000000..a4da8443787
--- /dev/null
+++ b/app/workers/hashed_storage/rollbacker_worker.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module HashedStorage
+ class RollbackerWorker
+ include ApplicationWorker
+
+ queue_namespace :hashed_storage
+
+ # @param [Integer] start initial ID of the batch
+ # @param [Integer] finish last ID of the batch
+ def perform(start, finish)
+ migrator = Gitlab::HashedStorage::Migrator.new
+ migrator.bulk_rollback(start: start, finish: finish)
+ end
+ end
+end