Class: Gitlab::BackgroundMigration::MergeRequestAssigneesMigrationProgressCheck

Inherits:
Object
  • Object
show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/background_migration/merge_request_assignees_migration_progress_check.rb

Overview

rubocop: disable Style/Documentation

Constant Summary collapse

RESCHEDULE_DELAY =
3.hours
WORKER =
'PopulateMergeRequestAssigneesTable'
DeadJobsError =
Class.new(StandardError)

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#performObject

Raises:


13
14
15
16
17
18
19
20
21
# File 'lib/gitlab/background_migration/merge_request_assignees_migration_progress_check.rb', line 13

def perform
  raise DeadJobsError, "Only dead background jobs in the queue for #{WORKER}" if !ongoing? && dead_jobs?

  if ongoing?
    BackgroundMigrationWorker.perform_in(RESCHEDULE_DELAY, self.class.name)
  else
    Feature.enable(:multiple_merge_request_assignees)
  end
end