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

Change name

This commit is contained in:
Jake Barnby 2023-10-12 20:15:16 +13:00
parent 34e7af806a
commit dc580c3d0d
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
3 changed files with 4 additions and 4 deletions

2
.env
View file

@ -1,7 +1,7 @@
_APP_ENV=development
_APP_LOCALE=en
_APP_WORKER_PER_CORE=6
_APP_CONNECTIONS_DB_QUEUE=database_db_main
_APP_QUEUE_NAME=database_db_main
_APP_CONSOLE_WHITELIST_ROOT=disabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=

View file

@ -229,13 +229,13 @@ 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
* - _APP_QUEUE_NAME 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(),
'workerName' => strtolower($workerName) ?? null,
'queueName' => App::getEnv('_APP_CONNECTIONS_DB_QUEUE', strtolower($workerName))
'queueName' => App::getEnv('_APP_QUEUE_NAME', 'v1-' . strtolower($workerName))
]);
} catch (\Exception $e) {
Console::error($e->getMessage() . ', File: ' . $e->getFile() . ', Line: ' . $e->getLine());

View file

@ -372,7 +372,7 @@ services:
- mariadb
environment:
- _APP_ENV
- _APP_CONNECTIONS_DB_QUEUE
- _APP_QUEUE_NAME
- _APP_WORKER_PER_CORE
- _APP_OPENSSL_KEY_V1
- _APP_REDIS_HOST