Class: Conductor::Worker::Events::ActiveWorkersChanged
- Inherits:
-
TaskRunnerEvent
- Object
- ConductorEvent
- TaskRunnerEvent
- Conductor::Worker::Events::ActiveWorkersChanged
- Defined in:
- lib/conductor/worker/events/task_runner_events.rb
Overview
Published when the active-worker count changes for a task type
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Attributes inherited from TaskRunnerEvent
Attributes inherited from ConductorEvent
Instance Method Summary collapse
-
#initialize(task_type:, count:) ⇒ ActiveWorkersChanged
constructor
A new instance of ActiveWorkersChanged.
- #to_h ⇒ Object
Constructor Details
#initialize(task_type:, count:) ⇒ ActiveWorkersChanged
Returns a new instance of ActiveWorkersChanged.
260 261 262 263 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 260 def initialize(task_type:, count:) super(task_type: task_type) @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
258 259 260 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 258 def count @count end |
Instance Method Details
#to_h ⇒ Object
265 266 267 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 265 def to_h super.merge(count: @count) end |