Class: Rafflesia::JobDiagnostic
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::JobDiagnostic
- Defined in:
- lib/rafflesia/jobs/job_diagnostic.rb
Constant Summary collapse
- HASH_ATTRS =
{ job_id: :job_id, last_seen_at: :last_seen_at, message: :message, observed_at: :observed_at, operation: :operation, queue_state: :queue_state, stale_after_ms: :stale_after_ms, status: :status, task_id: :task_id, type: :type, worker_id: :worker_id }.freeze
Instance Attribute Summary collapse
-
#job_id ⇒ Object
Returns the value of attribute job_id.
-
#last_seen_at ⇒ Object
Returns the value of attribute last_seen_at.
-
#message ⇒ Object
Returns the value of attribute message.
-
#observed_at ⇒ Object
Returns the value of attribute observed_at.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#queue_state ⇒ Object
Returns the value of attribute queue_state.
-
#stale_after_ms ⇒ Object
Returns the value of attribute stale_after_ms.
-
#status ⇒ Object
Returns the value of attribute status.
-
#task_id ⇒ Object
Returns the value of attribute task_id.
-
#type ⇒ Object
Returns the value of attribute type.
-
#worker_id ⇒ Object
Returns the value of attribute worker_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ JobDiagnostic
constructor
A new instance of JobDiagnostic.
Constructor Details
#initialize(json) ⇒ JobDiagnostic
Returns a new instance of JobDiagnostic.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @job_id = hash[:job_id] @last_seen_at = hash[:last_seen_at] @message = hash[:message] @observed_at = hash[:observed_at] @operation = hash[:operation] @queue_state = hash[:queue_state] @stale_after_ms = hash[:stale_after_ms] @status = hash[:status] @task_id = hash[:task_id] @type = hash[:type] @worker_id = hash[:worker_id] end |
Instance Attribute Details
#job_id ⇒ Object
Returns the value of attribute job_id.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def job_id @job_id end |
#last_seen_at ⇒ Object
Returns the value of attribute last_seen_at.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def last_seen_at @last_seen_at end |
#message ⇒ Object
Returns the value of attribute message.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def @message end |
#observed_at ⇒ Object
Returns the value of attribute observed_at.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def observed_at @observed_at end |
#operation ⇒ Object
Returns the value of attribute operation.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def operation @operation end |
#queue_state ⇒ Object
Returns the value of attribute queue_state.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def queue_state @queue_state end |
#stale_after_ms ⇒ Object
Returns the value of attribute stale_after_ms.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def stale_after_ms @stale_after_ms end |
#status ⇒ Object
Returns the value of attribute status.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def status @status end |
#task_id ⇒ Object
Returns the value of attribute task_id.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def task_id @task_id end |
#type ⇒ Object
Returns the value of attribute type.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def type @type end |
#worker_id ⇒ Object
Returns the value of attribute worker_id.
22 23 24 |
# File 'lib/rafflesia/jobs/job_diagnostic.rb', line 22 def worker_id @worker_id end |