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:
parent
72c3fe9a54
commit
efb624cc2f
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ class Sidekiqctl
|
|||
@timeout = timeout
|
||||
|
||||
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
|
||||
|
||||
fetch_process
|
||||
|
@ -40,7 +40,7 @@ class Sidekiqctl
|
|||
end
|
||||
|
||||
def pid
|
||||
File.read(pidfile).to_i
|
||||
@pid ||= File.read(pidfile).to_i
|
||||
end
|
||||
|
||||
def quiet
|
||||
|
|
Loading…
Reference in a new issue