summaryrefslogtreecommitdiff
path: root/app/workers/background_migration_worker.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-11-29 16:30:17 +0100
committerDouwe Maan <douwe@selenight.nl>2017-12-05 11:59:39 +0100
commit1e6ca3c41ead23c5e433460c8c807ea73d9ec0ef (patch)
treeed6a5da0def848adc1a15f80e69d9c55651895a4 /app/workers/background_migration_worker.rb
parenta5c3f1c8ff7da20183b172b2b0693a6010c9e86d (diff)
downloadgitlab-ce-1e6ca3c41ead23c5e433460c8c807ea73d9ec0ef.tar.gz
Consistently schedule Sidekiq jobsdm-application-worker
Diffstat (limited to 'app/workers/background_migration_worker.rb')
-rw-r--r--app/workers/background_migration_worker.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/app/workers/background_migration_worker.rb b/app/workers/background_migration_worker.rb
index 65791c4eaba..aeb3bc019b9 100644
--- a/app/workers/background_migration_worker.rb
+++ b/app/workers/background_migration_worker.rb
@@ -1,34 +1,6 @@
class BackgroundMigrationWorker
include ApplicationWorker
- # Enqueues a number of jobs in bulk.
- #
- # The `jobs` argument should be an Array of Arrays, each sub-array must be in
- # the form:
- #
- # [migration-class, [arg1, arg2, ...]]
- def self.perform_bulk(jobs)
- Sidekiq::Client.push_bulk('class' => self,
- 'queue' => sidekiq_options['queue'],
- 'args' => jobs)
- end
-
- # Schedules multiple jobs in bulk, with a delay.
- #
- def self.perform_bulk_in(delay, jobs)
- now = Time.now.to_i
- schedule = now + delay.to_i
-
- if schedule <= now
- raise ArgumentError, 'The schedule time must be in the future!'
- end
-
- Sidekiq::Client.push_bulk('class' => self,
- 'queue' => sidekiq_options['queue'],
- 'args' => jobs,
- 'at' => schedule)
- end
-
# Performs the background migration.
#
# See Gitlab::BackgroundMigration.perform for more information.