Class: Rafflesia::JobQueueTask
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::JobQueueTask
- Defined in:
- lib/rafflesia/jobs/job_queue_task.rb
Constant Summary collapse
- HASH_ATTRS =
{ completed_at: :completed_at, group: :group, is_orphaned: :is_orphaned, job_id: :job_id, last_error: :last_error, last_failed_at: :last_failed_at, max_retry: :max_retry, next_process_at: :next_process_at, payload_hash: :payload_hash, queue: :queue, retried: :retried, state: :state, task_id: :task_id, type: :type }.freeze
Instance Attribute Summary collapse
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#group ⇒ Object
Returns the value of attribute group.
-
#is_orphaned ⇒ Object
Returns the value of attribute is_orphaned.
-
#job_id ⇒ Object
Returns the value of attribute job_id.
-
#last_error ⇒ Object
Returns the value of attribute last_error.
-
#last_failed_at ⇒ Object
Returns the value of attribute last_failed_at.
-
#max_retry ⇒ Object
Returns the value of attribute max_retry.
-
#next_process_at ⇒ Object
Returns the value of attribute next_process_at.
-
#payload_hash ⇒ Object
Returns the value of attribute payload_hash.
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#retried ⇒ Object
Returns the value of attribute retried.
-
#state ⇒ Object
Returns the value of attribute state.
-
#task_id ⇒ Object
Returns the value of attribute task_id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ JobQueueTask
constructor
A new instance of JobQueueTask.
Constructor Details
#initialize(json) ⇒ JobQueueTask
Returns a new instance of JobQueueTask.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @completed_at = hash[:completed_at] @group = hash[:group] @is_orphaned = hash[:is_orphaned] @job_id = hash[:job_id] @last_error = hash[:last_error] @last_failed_at = hash[:last_failed_at] @max_retry = hash[:max_retry] @next_process_at = hash[:next_process_at] @payload_hash = hash[:payload_hash] @queue = hash[:queue] @retried = hash[:retried] @state = hash[:state] @task_id = hash[:task_id] @type = hash[:type] end |
Instance Attribute Details
#completed_at ⇒ Object
Returns the value of attribute completed_at.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def completed_at @completed_at end |
#group ⇒ Object
Returns the value of attribute group.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def group @group end |
#is_orphaned ⇒ Object
Returns the value of attribute is_orphaned.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def is_orphaned @is_orphaned end |
#job_id ⇒ Object
Returns the value of attribute job_id.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def job_id @job_id end |
#last_error ⇒ Object
Returns the value of attribute last_error.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def last_error @last_error end |
#last_failed_at ⇒ Object
Returns the value of attribute last_failed_at.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def last_failed_at @last_failed_at end |
#max_retry ⇒ Object
Returns the value of attribute max_retry.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def max_retry @max_retry end |
#next_process_at ⇒ Object
Returns the value of attribute next_process_at.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def next_process_at @next_process_at end |
#payload_hash ⇒ Object
Returns the value of attribute payload_hash.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def payload_hash @payload_hash end |
#queue ⇒ Object
Returns the value of attribute queue.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def queue @queue end |
#retried ⇒ Object
Returns the value of attribute retried.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def retried @retried end |
#state ⇒ Object
Returns the value of attribute state.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def state @state end |
#task_id ⇒ Object
Returns the value of attribute task_id.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def task_id @task_id end |
#type ⇒ Object
Returns the value of attribute type.
25 26 27 |
# File 'lib/rafflesia/jobs/job_queue_task.rb', line 25 def type @type end |