fixed bugs

This commit is contained in:
huangjx
2022-02-22 20:52:38 +08:00
parent 1815c4f00c
commit 938055e6ea
5 changed files with 43 additions and 25 deletions

View File

@@ -209,8 +209,10 @@ class Helper
$exeSniffer = new ExecutableFinder();
// Returns null if nothing is found
$result = $exeSniffer->find($program, $default, $paths);
// store the value for 5 minutes
$memcache->set($program, $result, 300);
if ($result) {
// store the value for 5 minutes
$memcache->set($program, $result, 300);
}
return $result;
}
@@ -324,4 +326,9 @@ class Helper
return self::doSignal($pid, 9);
}
public static function pythonInstalled()
{
return (bool) self::findBinaryPath('python');
}
}