diff --git a/.env b/.env index 0ecd29bb7..c20299b42 100644 --- a/.env +++ b/.env @@ -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= diff --git a/app/worker.php b/app/worker.php index ef58d5dfc..a8e806ff9 100644 --- a/app/worker.php +++ b/app/worker.php @@ -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()); diff --git a/docker-compose.yml b/docker-compose.yml index fe41866ac..d27dd99e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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