Class: Sidekiq::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/api.rb

Overview

Sidekiq::Process has a set of attributes which look like this:

'hostname' => 'app-1.example.com',
'started_at' => <process start time>,
'pid' => 12345,
'tag' => 'myapp'
'concurrency' => 25,
'queues' => ['default', 'low'],
'busy' => 10,
'beat' => <last heartbeat>,

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Process

Returns a new instance of Process.



576
577
578
# File 'lib/sidekiq/api.rb', line 576

def initialize(hash)
  @attribs = hash
end

Instance Method Details

#[](key) ⇒ Object



580
581
582
# File 'lib/sidekiq/api.rb', line 580

def [](key)
  @attribs[key]
end

#quiet!Object



584
585
586
# File 'lib/sidekiq/api.rb', line 584

def quiet!
  signal('USR1')
end

#stop!Object



588
589
590
# File 'lib/sidekiq/api.rb', line 588

def stop!
  signal('TERM')
end