Class: Dynflow::Coordinator::ExecutorWorld

Inherits:
WorldRecord show all
Defined in:
lib/dynflow/coordinator.rb

Constant Summary

Constants inherited from Serializable

Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT

Instance Attribute Summary

Attributes inherited from Record

#data

Instance Method Summary collapse

Methods inherited from WorldRecord

#meta

Methods inherited from Record

#==, constantize, #from_hash, #hash, #id, new_from_hash, #to_hash, #to_s, #validate!

Methods inherited from Serializable

constantize, from_hash, new_from_hash, #to_hash

Constructor Details

#initialize(world) ⇒ ExecutorWorld

Returns a new instance of ExecutorWorld.



100
101
102
103
# File 'lib/dynflow/coordinator.rb', line 100

def initialize(world)
  super
  self.active = !world.terminating?
end

Instance Method Details

#active=(value) ⇒ Object



109
110
111
112
# File 'lib/dynflow/coordinator.rb', line 109

def active=(value)
  Type! value, Algebrick::Types::Boolean
  @data[:active] = value
end

#active?Boolean

Returns:

  • (Boolean)


105
106
107
# File 'lib/dynflow/coordinator.rb', line 105

def active?
  @data[:active]
end

#executor?Boolean

Returns:

  • (Boolean)


114
115
116
# File 'lib/dynflow/coordinator.rb', line 114

def executor?
  true
end