cache_store: handle missing process.
If we try to kill the process but it's already dead just ignore it.
This commit is contained in:
parent
108999f7d7
commit
7eb4b92d30
@ -89,7 +89,12 @@ class CacheStoreDatabase
|
|||||||
end
|
end
|
||||||
rescue ErrorDuringExecution, Timeout::Error
|
rescue ErrorDuringExecution, Timeout::Error
|
||||||
odebug "Failed to read #{dbm_file_path}!"
|
odebug "Failed to read #{dbm_file_path}!"
|
||||||
|
begin
|
||||||
Process.kill(:KILL, dbm_test_read_cmd.pid)
|
Process.kill(:KILL, dbm_test_read_cmd.pid)
|
||||||
|
rescue Errno::ESRCH
|
||||||
|
# Process has already terminated.
|
||||||
|
nil
|
||||||
|
end
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
cache_path.delete unless dbm_test_read_success
|
cache_path.delete unless dbm_test_read_success
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user