1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00
This commit is contained in:
Jake Barnby 2023-10-12 15:02:53 +13:00
parent 7a78f49eb9
commit 69abd222e8
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
3 changed files with 5 additions and 12 deletions

3
.env
View file

@ -4,8 +4,7 @@ _APP_WORKER_PER_CORE=6
_APP_CONSOLE_WHITELIST_ROOT=disabled _APP_CONSOLE_WHITELIST_ROOT=disabled
_APP_CONSOLE_WHITELIST_EMAILS= _APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS= _APP_CONSOLE_WHITELIST_IPS=
_APP_CONNECTIONS_QUEUE_PER_WORKER=enabled _APP_CONNECTIONS_DB_QUEUE=database-db-main
_APP_CONNECTIONS_DB_QUEUES=v1-database-0,v1-database-1,v1-database-2
_APP_SYSTEM_EMAIL_NAME=Appwrite _APP_SYSTEM_EMAIL_NAME=Appwrite
_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io _APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io

View file

@ -372,8 +372,7 @@ services:
- mariadb - mariadb
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_CONNECTIONS_QUEUE_PER_WORKER - _APP_CONNECTIONS_DB_QUEUE
- _APP_CONNECTIONS_DB_QUEUES
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
- _APP_OPENSSL_KEY_V1 - _APP_OPENSSL_KEY_V1
- _APP_REDIS_HOST - _APP_REDIS_HOST

View file

@ -17,15 +17,10 @@ class Database extends Event
public function __construct(protected Connection $connection) public function __construct(protected Connection $connection)
{ {
parent::__construct($connection); parent::__construct($connection);
$dbQueues = App::getEnv('_APP_CONNECTIONS_DB_QUEUES');
if (empty($dbQueues)) { $this
$queue = Event::DATABASE_QUEUE_NAME; ->setQueue($this->getProject()->getAttribute('database'))
} else { ->setClass(Event::DATABASE_CLASS_NAME);
$queue = $this->getProject()->getAttribute('database');
}
parent::__construct($queue, Event::DATABASE_CLASS_NAME);
} }
/** /**