Class: Gitlab::BackgroundMigration::BaseJob

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/background_migration/base_job.rb

Overview

Simple base class for background migration job classes which are executed through the sidekiq queue.

Any job class that inherits from the base class will have connection to the tracking database set on initialization.

Instance Method Summary collapse

Constructor Details

#initialize(connection:) ⇒ BaseJob

Returns a new instance of BaseJob.



10
11
12
# File 'lib/gitlab/background_migration/base_job.rb', line 10

def initialize(connection:)
  @connection = connection
end

Instance Method Details

#perform(*arguments) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/gitlab/background_migration/base_job.rb', line 14

def perform(*arguments)
  raise NotImplementedError, "subclasses of #{self.class.name} must implement #{__method__}"
end