Class: Rafflesia::JobQueueInfo

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/jobs/job_queue_info.rb

Constant Summary collapse

HASH_ATTRS =
{
  active: :active,
  aggregating: :aggregating,
  archived: :archived,
  completed: :completed,
  failed: :failed,
  failed_total: :failed_total,
  groups: :groups,
  latency_ms: :latency_ms,
  memory_usage_bytes: :memory_usage_bytes,
  paused: :paused,
  pending: :pending,
  processed: :processed,
  processed_total: :processed_total,
  queue: :queue,
  retry: :retry,
  scheduled: :scheduled,
  size: :size,
  snapshot_at: :snapshot_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ JobQueueInfo

Returns a new instance of JobQueueInfo.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 49

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @active = hash[:active]
  @aggregating = hash[:aggregating]
  @archived = hash[:archived]
  @completed = hash[:completed]
  @failed = hash[:failed]
  @failed_total = hash[:failed_total]
  @groups = hash[:groups]
  @latency_ms = hash[:latency_ms]
  @memory_usage_bytes = hash[:memory_usage_bytes]
  @paused = hash[:paused]
  @pending = hash[:pending]
  @processed = hash[:processed]
  @processed_total = hash[:processed_total]
  @queue = hash[:queue]
  @retry = hash[:retry]
  @scheduled = hash[:scheduled]
  @size = hash[:size]
  @snapshot_at = hash[:snapshot_at]
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def active
  @active
end

#aggregatingObject

Returns the value of attribute aggregating.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def aggregating
  @aggregating
end

#archivedObject

Returns the value of attribute archived.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def archived
  @archived
end

#completedObject

Returns the value of attribute completed.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def completed
  @completed
end

#failedObject

Returns the value of attribute failed.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def failed
  @failed
end

#failed_totalObject

Returns the value of attribute failed_total.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def failed_total
  @failed_total
end

#groupsObject

Returns the value of attribute groups.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def groups
  @groups
end

#latency_msObject

Returns the value of attribute latency_ms.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def latency_ms
  @latency_ms
end

#memory_usage_bytesObject

Returns the value of attribute memory_usage_bytes.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def memory_usage_bytes
  @memory_usage_bytes
end

#pausedObject

Returns the value of attribute paused.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def paused
  @paused
end

#pendingObject

Returns the value of attribute pending.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def pending
  @pending
end

#processedObject

Returns the value of attribute processed.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def processed
  @processed
end

#processed_totalObject

Returns the value of attribute processed_total.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def processed_total
  @processed_total
end

#queueObject

Returns the value of attribute queue.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def queue
  @queue
end

#retryObject

Returns the value of attribute retry.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def retry
  @retry
end

#scheduledObject

Returns the value of attribute scheduled.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def scheduled
  @scheduled
end

#sizeObject

Returns the value of attribute size.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def size
  @size
end

#snapshot_atObject

Returns the value of attribute snapshot_at.



29
30
31
# File 'lib/rafflesia/jobs/job_queue_info.rb', line 29

def snapshot_at
  @snapshot_at
end