Simplify
This commit is contained in:
parent
7a78f49eb9
commit
69abd222e8
3 changed files with 5 additions and 12 deletions
3
.env
3
.env
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue