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.



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

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

Instance Attribute Details

#coreObject (readonly)

Returns the value of attribute core.



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

def core
  @core
end

Instance Method Details

#clean!Object



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

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

#core_classObject



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

def core_class
  Core
end

#spawnObject



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

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