Class: Taskinator::Queues::LoggedAdapter
- Inherits:
-
Delegator
- Object
- Delegator
- Taskinator::Queues::LoggedAdapter
- Defined in:
- lib/taskinator/queues.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #enqueue_create_process(definition, uuid, args) ⇒ Object
- #enqueue_task(task) ⇒ Object
-
#initialize(adapter) ⇒ LoggedAdapter
constructor
A new instance of LoggedAdapter.
Constructor Details
#initialize(adapter) ⇒ LoggedAdapter
Returns a new instance of LoggedAdapter.
22 23 24 25 |
# File 'lib/taskinator/queues.rb', line 22 def initialize(adapter) Taskinator.logger.info("Initialized '#{adapter.class.name}' queue adapter") @adapter = adapter end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
20 21 22 |
# File 'lib/taskinator/queues.rb', line 20 def adapter @adapter end |
Instance Method Details
#__getobj__ ⇒ Object
27 28 29 |
# File 'lib/taskinator/queues.rb', line 27 def __getobj__ adapter end |
#enqueue_create_process(definition, uuid, args) ⇒ Object
31 32 33 34 |
# File 'lib/taskinator/queues.rb', line 31 def enqueue_create_process(definition, uuid, args) Taskinator.logger.info("Enqueuing process creation for #{definition}") adapter.enqueue_create_process(definition, uuid, args) end |
#enqueue_task(task) ⇒ Object
36 37 38 39 |
# File 'lib/taskinator/queues.rb', line 36 def enqueue_task(task) Taskinator.logger.info("Enqueuing task #{task}") adapter.enqueue_task(task) end |