1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

use of the PID global was causing warnings for some reason

This commit is contained in:
Mike Perham 2019-04-26 12:27:16 -07:00
parent 0352ca8fb5
commit 72ae52db83
3 changed files with 4 additions and 4 deletions

View file

@ -148,7 +148,7 @@ module Sidekiq
return unless msg
::Process.kill(msg, $PID)
::Process.kill(msg, ::Process.pid)
rescue => e
# ignore all redis/network issues
logger.error("heartbeat: #{e.message}")
@ -163,7 +163,7 @@ module Sidekiq
{
"hostname" => hostname,
"started_at" => Time.now.to_f,
"pid" => $PID,
"pid" => ::Process.pid,
"tag" => @options[:tag] || "",
"concurrency" => @options[:concurrency],
"queues" => @options[:queues].uniq,

View file

@ -12,7 +12,7 @@ module Sidekiq
options[key.to_sym] = options.delete(key)
end
options[:id] = "Sidekiq-#{Sidekiq.server? ? "server" : "client"}-PID-#{$PID}" unless options.key?(:id)
options[:id] = "Sidekiq-#{Sidekiq.server? ? "server" : "client"}-PID-#{::Process.pid}" unless options.key?(:id)
options[:url] ||= determine_redis_provider
size = if options[:size]

View file

@ -48,7 +48,7 @@ module Sidekiq
end
def identity
@identity ||= "#{hostname}:#{$PID}:#{process_nonce}"
@identity ||= "#{hostname}:#{::Process.pid}:#{process_nonce}"
end
def fire_event(event, options = {})