mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Remove PID hackery, GH-22
This commit is contained in:
parent
8daf4d7301
commit
8345a196c0
1 changed files with 1 additions and 13 deletions
|
@ -55,19 +55,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def process_id
|
||||
Sidekiq::Util.process_id
|
||||
end
|
||||
|
||||
def self.process_id
|
||||
@pid ||= begin
|
||||
if Process.pid == 1
|
||||
# Heroku does not expose pids.
|
||||
require 'securerandom'
|
||||
(SecureRandom.random_number * 4_000_000_000).floor.to_s(16)
|
||||
else
|
||||
Process.pid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue