debian-mirror-gitlab/lib/gitlab/background_migration/batching_strategies/base_strategy.rb

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

27 lines
643 B
Ruby
Raw Normal View History

2022-05-07 20:08:51 +05:30
# frozen_string_literal: true
module Gitlab
module BackgroundMigration
module BatchingStrategies
# Simple base class for batching strategy job classes.
#
# Any strategy class that inherits from the base class will have connection to the tracking database set on
# initialization.
class BaseStrategy
def initialize(connection:)
@connection = connection
end
def next_batch(*arguments)
raise NotImplementedError,
"#{self.class} does not implement #{__method__}"
end
private
attr_reader :connection
end
end
end
end