Class: SolidQueueTui::Data::ProcessesQuery::Process
- Inherits:
-
Struct
- Object
- Struct
- SolidQueueTui::Data::ProcessesQuery::Process
- Defined in:
- lib/solid_queue_tui/data/processes_query.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#last_heartbeat_at ⇒ Object
Returns the value of attribute last_heartbeat_at.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#supervisor_id ⇒ Object
Returns the value of attribute supervisor_id.
Instance Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def created_at @created_at end |
#hostname ⇒ Object
Returns the value of attribute hostname
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def hostname @hostname end |
#id ⇒ Object
Returns the value of attribute id
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def kind @kind end |
#last_heartbeat_at ⇒ Object
Returns the value of attribute last_heartbeat_at
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def last_heartbeat_at @last_heartbeat_at end |
#metadata ⇒ Object
Returns the value of attribute metadata
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def @metadata end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def name @name end |
#pid ⇒ Object
Returns the value of attribute pid
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def pid @pid end |
#supervisor_id ⇒ Object
Returns the value of attribute supervisor_id
6 7 8 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 6 def supervisor_id @supervisor_id end |
Instance Method Details
#alive?(threshold: 60) ⇒ Boolean
11 12 13 14 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 11 def alive?(threshold: 60) return false unless last_heartbeat_at (Time.now.utc - last_heartbeat_at) < threshold end |
#queues ⇒ Object
21 22 23 24 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 21 def queues return [] unless .is_a?(Hash) ["queues"] || [] end |
#thread_count ⇒ Object
26 27 28 29 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 26 def thread_count return nil unless .is_a?(Hash) ["threads"] || ["polling_interval"] end |
#uptime ⇒ Object
16 17 18 19 |
# File 'lib/solid_queue_tui/data/processes_query.rb', line 16 def uptime return nil unless created_at Time.now.utc - created_at end |