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

Add docblock for env vars

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

View file

@ -225,6 +225,12 @@ if (!empty($workerNum)) {
}
try {
/**
* Any worker can be configured with the following env vars:
* - _APP_WORKERS_NUM The total number of worker processes
* - _APP_WORKER_PER_CORE The number of worker processes per core (ignored if _APP_WORKERS_NUM is set)
* - _APP_CONNECTIONS_DB_QUEUE The name of the queue to read for database events
*/
$platform->init(Service::TYPE_WORKER, [
'workersNum' => App::getEnv('_APP_WORKERS_NUM', swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6))),
'connection' => $pools->get('queue')->pop()->getResource(),