debian-mirror-gitlab/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb
2023-07-09 08:55:56 +05:30

29 lines
904 B
Ruby

# frozen_string_literal: true
class RemoveClustersApplicationsJobInstances < Gitlab::Database::Migration[2.0]
DEPRECATED_JOB_CLASSES = %w[
ClusterConfigureIstioWorker
ClusterInstallAppWorker
ClusterPatchAppWorker
ClusterUpdateAppWorker
ClusterUpgradeAppWorker
ClusterWaitForAppInstallationWorker
ClusterWaitForAppUpdateWorker
ClusterWaitForIngressIpAddressWorker
]
disable_ddl_transaction!
def up
sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES)
end
def down
# no-op Why: This migration removes any instances of deprecated job classes
# from expected queues via the sidekiq_queue_length method. Once the job
# class instances are removed, they cannot be added back. These job classes
# are deprecated and previous MRs have already no-op'd their perform
# methods to further increase confidence that removal is OK.
end
end