Class: Dynflow::SimpleWorld
Instance Attribute Summary
Attributes inherited from World
#action_classes, #auto_rescue, #executor, #logger_adapter, #middleware, #options, #persistence, #subscription_index, #transaction_adapter
Instance Method Summary collapse
- #default_options ⇒ Object
-
#initialize(options_hash = {}) ⇒ SimpleWorld
constructor
A new instance of SimpleWorld.
Methods inherited from World
#action_logger, #clock, #consistency_check, #event, #execute, #execute_planned_execution_plans, #logger, #plan, #reload!, #subscribed_actions, #terminate, #trigger
Constructor Details
#initialize(options_hash = {}) ⇒ SimpleWorld
Returns a new instance of SimpleWorld.
3 4 5 6 7 8 9 10 |
# File 'lib/dynflow/simple_world.rb', line 3 def initialize( = {}) super at_exit { self.terminate.wait } if [:auto_terminate] # we can check consistency here because SimpleWorld doesn't expect # remote executor being in place. self.consistency_check self.execute_planned_execution_plans end |
Instance Method Details
#default_options ⇒ Object
12 13 14 15 16 17 |
# File 'lib/dynflow/simple_world.rb', line 12 def super.merge(pool_size: 5, persistence_adapter: PersistenceAdapters::Sequel.new('sqlite:/'), transaction_adapter: TransactionAdapters::None.new, auto_terminate: true) end |