mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-25 01:35:14 +00:00
only remove pid file during tests if exists
This commit is contained in:
parent
998b46887a
commit
e54c7ca99a
@ -59,12 +59,14 @@ function killRedis($pid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pidFile = TEST_MISC . '/' . $matches[1];
|
$pidFile = TEST_MISC . '/' . $matches[1];
|
||||||
|
if (file_exists($pidFile)) {
|
||||||
$pid = trim(file_get_contents($pidFile));
|
$pid = trim(file_get_contents($pidFile));
|
||||||
posix_kill((int) $pid, 9);
|
posix_kill((int) $pid, 9);
|
||||||
|
|
||||||
if(is_file($pidFile)) {
|
if(is_file($pidFile)) {
|
||||||
unlink($pidFile);
|
unlink($pidFile);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the redis database
|
// Remove the redis database
|
||||||
if(!preg_match('#^\s*dir\s+([^\s]+)#m', $config, $matches)) {
|
if(!preg_match('#^\s*dir\s+([^\s]+)#m', $config, $matches)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user