summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210918202855_reschedule_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
blob: 88351b3007a31096b6d5b7fdfbbd144bf6718124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class ReschedulePendingJobsForRecalculateVulnerabilitiesOccurrencesUuid < Gitlab::Database::Migration[1.0]
  MIGRATION = "RecalculateVulnerabilitiesOccurrencesUuid"
  DELAY_INTERVAL = 2.minutes

  disable_ddl_transaction!

  def up
    delete_queued_jobs(MIGRATION)

    requeue_background_migration_jobs_by_range_at_intervals(MIGRATION, DELAY_INTERVAL)
  end

  def down
    # no-op
  end
end