diff options
Diffstat (limited to 'db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb')
-rw-r--r-- | db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb b/db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb deleted file mode 100644 index 4ec514f7fca..00000000000 --- a/db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class DropActivatePrometheusServicesBackgroundJobs < ActiveRecord::Migration[6.0] - DOWNTIME = false - DROPPED_JOB_CLASS = 'ActivatePrometheusServicesForSharedClusterApplications' - QUEUE = 'background_migration' - - def up - sidekiq_queues.each do |queue| - queue.each do |job| - klass, project_id, *should_be_empty = job.args - next unless klass == DROPPED_JOB_CLASS && project_id.is_a?(Integer) && should_be_empty.empty? - - job.delete - end - end - end - - def down - # no-op - end - - def sidekiq_queues - [Sidekiq::ScheduledSet.new, Sidekiq::RetrySet.new, Sidekiq::Queue.new(QUEUE)] - end -end |