Class: Dynflow::Actors::ExecutionPlanCleaner

Inherits:
Object
  • Object
show all
Defined in:
lib/dynflow/actors/execution_plan_cleaner.rb

Defined Under Namespace

Classes: Core

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(world, options = {}) ⇒ ExecutionPlanCleaner

Returns a new instance of ExecutionPlanCleaner.



8
9
10
11
# File 'lib/dynflow/actors/execution_plan_cleaner.rb', line 8

def initialize(world, options = {})
  @world = world
  @options = options
end

Instance Attribute Details

#coreObject (readonly)

Returns the value of attribute core.



6
7
8
# File 'lib/dynflow/actors/execution_plan_cleaner.rb', line 6

def core
  @core
end

Instance Method Details

#clean!Object



25
26
27
# File 'lib/dynflow/actors/execution_plan_cleaner.rb', line 25

def clean!
  core.tell([:clean!])
end

#core_classObject



13
14
15
# File 'lib/dynflow/actors/execution_plan_cleaner.rb', line 13

def core_class
  Core
end

#spawnObject



17
18
19
20
21
22
23
# File 'lib/dynflow/actors/execution_plan_cleaner.rb', line 17

def spawn
  Concurrent::Promises.resolvable_future.tap do |initialized|
    @core = core_class.spawn(:name => 'execution-plan-cleaner',
                             :args => [@world, @options],
                             :initialized => initialized)
  end
end