Default to 1 database worker for self-hosted installations

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-24 08:38:03 +00:00
co-authored by abnegate
parent 0e76c9dc18
commit 8cfb37771e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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;
}