mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 18:37:31 +08:00
improve check install status when running in docker
This commit is contained in:
@@ -40,7 +40,7 @@ class class_cache_redis {
|
||||
if (isset($config['timeout']) && is_numeric($config['timeout'])) {
|
||||
$params[] = $config['timeout'];
|
||||
}
|
||||
if ($this->isFpmMode()) {
|
||||
if (nexus()->isFpmMode()) {
|
||||
try {
|
||||
$connectResult = $redis->pconnect(...$params);
|
||||
} catch (\Exception $e) {
|
||||
@@ -68,11 +68,6 @@ class class_cache_redis {
|
||||
return true;
|
||||
}
|
||||
|
||||
private function isFpmMode(): bool
|
||||
{
|
||||
return php_sapi_name() === 'fpm-fcgi';
|
||||
}
|
||||
|
||||
function getIsEnabled() {
|
||||
return $this->isEnabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user