Class: PartitionGardener::CompositeMaintenance

Inherits:
Object
  • Object
show all
Defined in:
lib/partition_gardener/strategy/composite.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, job_class_name: "PartitionGardener", executor: nil) ⇒ CompositeMaintenance

Returns a new instance of CompositeMaintenance.



3
4
5
6
7
# File 'lib/partition_gardener/strategy/composite.rb', line 3

def initialize(config, job_class_name: "PartitionGardener", executor: nil)
  @config = config
  @job_class_name = job_class_name
  @executor = executor || Executor.for_config(config)
end

Instance Method Details

#collapse_low_volume_future_month_partitionsObject



23
24
25
# File 'lib/partition_gardener/strategy/composite.rb', line 23

def collapse_low_volume_future_month_partitions
  run!
end

#run!Object



9
10
11
12
13
# File 'lib/partition_gardener/strategy/composite.rb', line 9

def run!
  Templates.expand(@config).each do |branch_config|
    ThreeAreaMaintenance.new(branch_config, job_class_name: @job_class_name, executor: @executor).run!
  end
end

#split_future_month_from_current!(_identifier = nil) ⇒ Object



15
16
17
# File 'lib/partition_gardener/strategy/composite.rb', line 15

def split_future_month_from_current!(_identifier = nil)
  run!
end

#split_pressured_future_month_partitionsObject



19
20
21
# File 'lib/partition_gardener/strategy/composite.rb', line 19

def split_pressured_future_month_partitions
  run!
end