1
0
Fork 0
mirror of synced 2024-06-26 10:10:57 +12:00

Fix env vars

This commit is contained in:
Jake Barnby 2023-10-12 19:10:45 +13:00
parent 6a05d9606e
commit effdeb4bc2
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -226,10 +226,10 @@ if (!empty($workerNum)) {
try {
$platform->init(Service::TYPE_WORKER, [
'workersNum' => str_starts_with(strtolower($workerName), 'databases') ? 1 : swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6)),
'workersNum' => App::getEnv('_APP_WORKERS_NUM', swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6))),
'connection' => $pools->get('queue')->pop()->getResource(),
'workerName' => strtolower($workerName) ?? null,
'queueName' => App::getEnv('_APP_CONNECTIONS_DB_QUEUE', 'database_db_main')
'queueName' => App::getEnv('_APP_CONNECTIONS_DB_QUEUE', strtolower($workerName))
]);
} catch (\Exception $e) {
Console::error($e->getMessage() . ', File: ' . $e->getFile() . ', Line: ' . $e->getLine());