Commit f0590e1d authored by Krasimir Angelov's avatar Krasimir Angelov

Merge branch 're-reschedule-delete-orphaned-deployments' into 'master'

Re Reschedule Delete Orphaned Deployments BG migration

See merge request gitlab-org/gitlab!71700
parents 25bec1d8 4fc0ad4e
# frozen_string_literal: true
class RerescheduleDeleteOrphanedDeployments < Gitlab::Database::Migration[1.0]
MIGRATION = 'DeleteOrphanedDeployments'
DELAY_INTERVAL = 2.minutes
disable_ddl_transaction!
# This is the third time to schedule `DeleteOrphanedDeployments` migration.
# The first time failed by an inappropriate batch size and the second time failed by a retry bug.
# Since there is no issue in this migration itself, we can simply requeue the
# migration jobs **without** no-op-ing the previous migration.
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69051#note_669230405 for more information.
def up
delete_queued_jobs(MIGRATION)
requeue_background_migration_jobs_by_range_at_intervals(MIGRATION, DELAY_INTERVAL)
end
def down
# no-op
end
end
40e15593d9ee0fb5a59d1576c6da5a1eece265730f7ae15c5c81c2c5343b362c
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment