Skip to content
Snippets Groups Projects

Migrate Sidekiq jobs based on routing rules

Merged Marco (Gregorius) requested to merge pdm-migrate-sidekiq-jobs-to-default into master
All threads resolved!
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -3,6 +3,7 @@
@@ -3,6 +3,7 @@
module Gitlab
module Gitlab
class SidekiqMigrateJobs
class SidekiqMigrateJobs
LOG_FREQUENCY = 1_000
LOG_FREQUENCY = 1_000
 
LOG_FREQUENCY_QUEUES = 10
attr_reader :logger, :mappings
attr_reader :logger, :mappings
@@ -68,7 +69,7 @@ def migrate_queues
@@ -68,7 +69,7 @@ def migrate_queues
migrated = 0
migrated = 0
while queue_length(queue_from) > 0
while queue_length(queue_from) > 0
begin
begin
if migrated >= 0 && migrated % LOG_FREQUENCY == 0
if migrated >= 0 && migrated % LOG_FREQUENCY_QUEUES == 0
logger&.info("Migrating from #{queue_from}. Total: #{queue_length(queue_from)}. Migrated: #{migrated}.")
logger&.info("Migrating from #{queue_from}. Total: #{queue_length(queue_from)}. Migrated: #{migrated}.")
end
end
Loading