Class: MissionControl::Jobs::Worker
- Inherits:
-
Object
- Object
- MissionControl::Jobs::Worker
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/mission_control/jobs/worker.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_heartbeat_at ⇒ Object
Returns the value of attribute last_heartbeat_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#initialize(queue_adapter: ActiveJob::Base.queue_adapter, **kwargs) ⇒ Worker
constructor
A new instance of Worker.
- #jobs ⇒ Object
Constructor Details
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
4 5 6 |
# File 'app/models/mission_control/jobs/worker.rb', line 4 def configuration @configuration end |
#hostname ⇒ Object
Returns the value of attribute hostname.
4 5 6 |
# File 'app/models/mission_control/jobs/worker.rb', line 4 def hostname @hostname end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'app/models/mission_control/jobs/worker.rb', line 4 def id @id end |
#last_heartbeat_at ⇒ Object
Returns the value of attribute last_heartbeat_at.
4 5 6 |
# File 'app/models/mission_control/jobs/worker.rb', line 4 def last_heartbeat_at @last_heartbeat_at end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'app/models/mission_control/jobs/worker.rb', line 4 def name @name end |
#raw_data ⇒ Object
Returns the value of attribute raw_data.
4 5 6 |
# File 'app/models/mission_control/jobs/worker.rb', line 4 def raw_data @raw_data end |
Instance Method Details
#jobs ⇒ Object
11 12 13 |
# File 'app/models/mission_control/jobs/worker.rb', line 11 def jobs @jobs ||= ActiveJob::JobsRelation.new(queue_adapter: queue_adapter).in_progress.where(worker_id: id) end |