debian-mirror-gitlab/lib/gitlab/database/migrations/runner_backoff/migration_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
569 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# frozen_string_literal: true
module Gitlab
module Database
module Migrations
module RunnerBackoff
module MigrationHelpers
extend ActiveSupport::Concern
class_methods do
def enable_runner_backoff!
@enable_runner_backoff = true # rubocop:disable Gitlab/ModuleWithInstanceVariables
end
def enable_runner_backoff?
!!@enable_runner_backoff
end
end
delegate :enable_runner_backoff?, to: :class
end
end
end
end
end