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

Fix sidekiqctl pidfile issues, fixes #1490

This commit is contained in:
Mike Perham 2014-02-18 11:23:15 -08:00
parent 72c3fe9a54
commit efb624cc2f

View file

@ -12,7 +12,7 @@ class Sidekiqctl
@timeout = timeout @timeout = timeout
done('No pidfile given', :error) if !pidfile done('No pidfile given', :error) if !pidfile
done("Pidfile #{pidfile} does not exist", :error) if !File.exist?(pidfile) done("Pidfile #{pidfile} does not exist", :warn) if !File.exist?(pidfile)
done('Invalid pidfile content', :error) if pid == 0 done('Invalid pidfile content', :error) if pid == 0
fetch_process fetch_process
@ -40,7 +40,7 @@ class Sidekiqctl
end end
def pid def pid
File.read(pidfile).to_i @pid ||= File.read(pidfile).to_i
end end
def quiet def quiet