Class: SolidFlow::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_flow.rb

Overview

Minimal dependency injection container for runtime components.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_queueObject

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_queueObject

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_queueObject

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_serializerObject

Returns the value of attribute event_serializer.



50
51
52
# File 'lib/solid_flow.rb', line 50

def event_serializer
  @event_serializer
end

#id_generatorObject

Returns the value of attribute id_generator.



50
51
52
# File 'lib/solid_flow.rb', line 50

def id_generator
  @id_generator
end

#loggerObject

Returns the value of attribute logger.



50
51
52
# File 'lib/solid_flow.rb', line 50

def logger
  @logger
end

#storeObject

Returns the value of attribute store.



50
51
52
# File 'lib/solid_flow.rb', line 50

def store
  @store
end

#task_registryObject

Returns the value of attribute task_registry.



50
51
52
# File 'lib/solid_flow.rb', line 50

def task_registry
  @task_registry
end

#time_providerObject

Returns the value of attribute time_provider.



50
51
52
# File 'lib/solid_flow.rb', line 50

def time_provider
  @time_provider
end

#workflow_registryObject

Returns the value of attribute workflow_registry.



50
51
52
# File 'lib/solid_flow.rb', line 50

def workflow_registry
  @workflow_registry
end