Class: Gitlab::BackgroundMigration::BatchingStrategies::BaseStrategy
- Inherits:
-
Object
- Object
- Gitlab::BackgroundMigration::BatchingStrategies::BaseStrategy
- Defined in:
- lib/gitlab/background_migration/batching_strategies/base_strategy.rb
Overview
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.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(connection:) ⇒ BaseStrategy
constructor
A new instance of BaseStrategy.
- #next_batch(*arguments) ⇒ Object
Constructor Details
#initialize(connection:) ⇒ BaseStrategy
Returns a new instance of BaseStrategy.
11 12 13 |
# File 'lib/gitlab/background_migration/batching_strategies/base_strategy.rb', line 11 def initialize(connection:) @connection = connection end |
Instance Method Details
#next_batch(*arguments) ⇒ Object
15 16 17 18 |
# File 'lib/gitlab/background_migration/batching_strategies/base_strategy.rb', line 15 def next_batch(*arguments) raise NotImplementedError, "#{self.class} does not implement #{__method__}" end |