mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Use argv for coroutine HTTP detection
This commit is contained in:
@@ -245,12 +245,7 @@ $register->set('pools', function () {
|
||||
$maxConnections = (int) System::getEnv('_APP_CONNECTIONS_MAX', 151);
|
||||
$instanceConnections = $maxConnections / (int) System::getEnv('_APP_POOL_CLIENTS', 14);
|
||||
|
||||
$scriptPath = (string) ($_SERVER['SCRIPT_FILENAME'] ?? '');
|
||||
if ($scriptPath === '') {
|
||||
$scriptPath = (string) ($_SERVER['argv'][0] ?? '');
|
||||
}
|
||||
|
||||
$scriptPath = \str_replace('\\', '/', $scriptPath);
|
||||
$scriptPath = \str_replace('\\', '/', (string) ($_SERVER['argv'][0] ?? ''));
|
||||
$isCoroutineHttp = $scriptPath === 'app/http.php' || \str_ends_with($scriptPath, '/app/http.php');
|
||||
|
||||
$workerCount = intval(System::getEnv('_APP_CPU_NUM', swoole_cpu_num())) * intval(System::getEnv('_APP_WORKER_PER_CORE', 6));
|
||||
|
||||
Reference in New Issue
Block a user