Class: PgDice::PgSliceManagerFactory

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
LogHelper
Defined in:
lib/pgdice/pg_slice_manager_factory.rb

Overview

PartitionManagerFactory is a class used to build PartitionManagers

Instance Method Summary collapse

Methods included from LogHelper

#blank?, log_duration, #squish

Constructor Details

#initialize(configuration, opts = {}) ⇒ PgSliceManagerFactory

Returns a new instance of PgSliceManagerFactory.



12
13
14
15
# File 'lib/pgdice/pg_slice_manager_factory.rb', line 12

def initialize(configuration, opts = {})
  @configuration = configuration
  @pg_slice_executor = opts[:pg_slice_executor] ||= executor
end

Instance Method Details

#callObject



17
18
19
20
21
22
# File 'lib/pgdice/pg_slice_manager_factory.rb', line 17

def call
  PgDice::PgSliceManager.new(logger: logger,
                             database_url: database_url,
                             pg_slice_executor: @pg_slice_executor,
                             dry_run: dry_run)
end