Class: Resque::Mcp::Models::Worker
- Inherits:
-
Data
- Object
- Data
- Resque::Mcp::Models::Worker
- Defined in:
- lib/resque/mcp/models/worker.rb
Overview
One registered worker. started is an opaque string.
current_job is a Models::Job (with queue/run_at) or nil.
Instance Attribute Summary collapse
-
#current_job ⇒ Object
readonly
Returns the value of attribute current_job.
-
#failed ⇒ Object
readonly
Returns the value of attribute failed.
-
#heartbeat_expired ⇒ Object
readonly
Returns the value of attribute heartbeat_expired.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#processed ⇒ Object
readonly
Returns the value of attribute processed.
-
#queues ⇒ Object
readonly
Returns the value of attribute queues.
-
#started ⇒ Object
readonly
Returns the value of attribute started.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
Instance Attribute Details
#current_job ⇒ Object (readonly)
Returns the value of attribute current_job
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def current_job @current_job end |
#failed ⇒ Object (readonly)
Returns the value of attribute failed
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def failed @failed end |
#heartbeat_expired ⇒ Object (readonly)
Returns the value of attribute heartbeat_expired
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def heartbeat_expired @heartbeat_expired end |
#id ⇒ Object (readonly)
Returns the value of attribute id
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def id @id end |
#processed ⇒ Object (readonly)
Returns the value of attribute processed
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def processed @processed end |
#queues ⇒ Object (readonly)
Returns the value of attribute queues
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def queues @queues end |
#started ⇒ Object (readonly)
Returns the value of attribute started
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def started @started end |
#state ⇒ Object (readonly)
Returns the value of attribute state
8 9 10 |
# File 'lib/resque/mcp/models/worker.rb', line 8 def state @state end |
Instance Method Details
#idle? ⇒ Boolean
14 |
# File 'lib/resque/mcp/models/worker.rb', line 14 def idle? = state == "idle" |
#working? ⇒ Boolean
12 |
# File 'lib/resque/mcp/models/worker.rb', line 12 def working? = state == "working" |