Class: SolidFlow::Configuration
- Inherits:
-
Object
- Object
- SolidFlow::Configuration
- Defined in:
- lib/solid_flow.rb
Overview
Minimal dependency injection container for runtime components.
Instance Attribute Summary collapse
-
#default_execution_queue ⇒ Object
Returns the value of attribute default_execution_queue.
-
#default_task_queue ⇒ Object
Returns the value of attribute default_task_queue.
-
#default_timer_queue ⇒ Object
Returns the value of attribute default_timer_queue.
-
#event_serializer ⇒ Object
Returns the value of attribute event_serializer.
-
#id_generator ⇒ Object
Returns the value of attribute id_generator.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#store ⇒ Object
Returns the value of attribute store.
-
#task_registry ⇒ Object
Returns the value of attribute task_registry.
-
#time_provider ⇒ Object
Returns the value of attribute time_provider.
-
#workflow_registry ⇒ Object
Returns the value of attribute workflow_registry.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/solid_flow.rb', line 61 def initialize @logger = Logger.new($stdout, level: Logger::INFO) @event_serializer = Serializers::Oj.new @workflow_registry = Registries::WorkflowRegistry.new @task_registry = Registries::TaskRegistry.new @default_execution_queue = "solidflow" @default_task_queue = "solidflow_tasks" @default_timer_queue = "solidflow_timers" @time_provider = -> { Time.current } @id_generator = -> { SecureRandom.uuid } @store = Stores::ActiveRecord.new(event_serializer: @event_serializer, time_provider: @time_provider, logger: @logger) end |
Instance Attribute Details
#default_execution_queue ⇒ Object
Returns the value of attribute default_execution_queue.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def default_execution_queue @default_execution_queue end |
#default_task_queue ⇒ Object
Returns the value of attribute default_task_queue.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def default_task_queue @default_task_queue end |
#default_timer_queue ⇒ Object
Returns the value of attribute default_timer_queue.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def default_timer_queue @default_timer_queue end |
#event_serializer ⇒ Object
Returns the value of attribute event_serializer.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def event_serializer @event_serializer end |
#id_generator ⇒ Object
Returns the value of attribute id_generator.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def id_generator @id_generator end |
#logger ⇒ Object
Returns the value of attribute logger.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def logger @logger end |
#store ⇒ Object
Returns the value of attribute store.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def store @store end |
#task_registry ⇒ Object
Returns the value of attribute task_registry.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def task_registry @task_registry end |
#time_provider ⇒ Object
Returns the value of attribute time_provider.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def time_provider @time_provider end |
#workflow_registry ⇒ Object
Returns the value of attribute workflow_registry.
50 51 52 |
# File 'lib/solid_flow.rb', line 50 def workflow_registry @workflow_registry end |