class Sidekiq::Process
}
‘beat’ => <last heartbeat>,
‘busy’ => 10,
‘queues’ => [‘default’, ‘low’],
‘concurrency’ => 25,
‘tag’ => ‘myapp’
‘pid’ => 12345,
‘started_at’ => <process start time>,
‘hostname’ => ‘app-1.example.com’,
{
Sidekiq::Process has a set of attributes which look like this:
def [](key)
def [](key) @attribs[key] end
def identity
def identity @id ||= "#{self['hostname']}:#{self['pid']}" end
def initialize(hash)
def initialize(hash) @attribs = hash end
def labels
def labels Array(self['labels']) end
def quiet!
def quiet! signal('USR1') end
def signal(sig)
def signal(sig) key = "#{identity}-signals" Sidekiq.redis do |c| c.multi do c.lpush(key, sig) c.expire(key, 60) end end end
def stop!
def stop! signal('TERM') end
def tag
def tag self['tag'] end