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

Seeing pidfile weirdness with relative paths, maybe this is necessary

This commit is contained in:
Mike Perham 2014-04-03 11:08:32 -07:00
parent 3e388d1da1
commit 0e71f97e7c

View file

@ -319,11 +319,12 @@ module Sidekiq
def write_pid
if path = options[:pidfile]
File.open(path, 'w') do |f|
pidfile = File.expand_path(path)
File.open(pidfile, 'w') do |f|
f.puts Process.pid
end
at_exit do
FileUtils.rm_f path
FileUtils.rm_f pidfile
end
end
end