mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Default to 1 database worker for self-hosted installations
Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
This commit is contained in:
co-authored by
abnegate
parent
0e76c9dc18
commit
8cfb37771e
@@ -367,7 +367,7 @@ $dbService = $this->getParam('database');
|
||||
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
|
||||
- _APP_EMAIL_CERTIFICATES
|
||||
|
||||
<?php for ($i = 0; $i < 4; $i++) { ?>
|
||||
<?php for ($i = 0; $i < 1; $i++) { ?>
|
||||
appwrite-worker-databases-<?= $i ?>:
|
||||
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
|
||||
entrypoint: worker-databases
|
||||
|
||||
@@ -173,7 +173,7 @@ class Database extends Event
|
||||
$dsn = new DSN("mysql://$database");
|
||||
}
|
||||
|
||||
$numWorkers = (int) System::getEnv('_APP_DATABASE_WORKERS', 4);
|
||||
$numWorkers = (int) System::getEnv('_APP_DATABASE_WORKERS', 1);
|
||||
$workerIndex = \abs(\crc32($project->getId())) % $numWorkers;
|
||||
$this->queue = $dsn->getHost() . '-' . $workerIndex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user