Class: Sideq::Workers
- Inherits:
-
Object
- Object
- Sideq::Workers
- Defined in:
- lib/sideq/workers.rb
Instance Attribute Summary collapse
-
#worker_set ⇒ Object
readonly
Returns the value of attribute worker_set.
Instance Method Summary collapse
-
#initialize ⇒ Workers
constructor
A new instance of Workers.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Workers
Returns a new instance of Workers.
5 6 7 |
# File 'lib/sideq/workers.rb', line 5 def initialize @worker_set = Sidekiq::Workers.new end |
Instance Attribute Details
#worker_set ⇒ Object (readonly)
Returns the value of attribute worker_set.
3 4 5 |
# File 'lib/sideq/workers.rb', line 3 def worker_set @worker_set end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/sideq/workers.rb', line 9 def to_s ary = [ "Workers: #{worker_set.size}" ] worker_set.each do |key, tid, json| ary << sprintf( "%15s %15s %20s\n", key, tid, json ) end ary.join( "\n" ) end |