Class: Sidekiq::MemoryGuardProcess
- Inherits:
-
Object
- Object
- Sidekiq::MemoryGuardProcess
- Defined in:
- lib/sidekiq/memory_guard_process.rb
Overview
Resolves Sidekiq's API representation of the current server process.
Class Method Summary collapse
Class Method Details
.busy_count(identity) ⇒ Integer?
18 19 20 21 22 |
# File 'lib/sidekiq/memory_guard_process.rb', line 18 def busy_count(identity) fetch(identity)['busy'].to_i rescue StandardError nil end |
.fetch(identity) ⇒ Sidekiq::Process
11 12 13 14 |
# File 'lib/sidekiq/memory_guard_process.rb', line 11 def fetch(identity) Sidekiq::ProcessSet[identity] || raise("Current Sidekiq process #{identity} was not found") end |