mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
chore: add simple toggle for dual writing
This commit is contained in:
parent
42a4fe2efc
commit
bfc0b53163
1 changed files with 2 additions and 4 deletions
|
|
@ -317,10 +317,8 @@ class StatsUsageDump extends Action
|
||||||
|
|
||||||
protected function writeToLogsDB(Document $project, Document $document)
|
protected function writeToLogsDB(Document $project, Document $document)
|
||||||
{
|
{
|
||||||
$databasesToDualWrite = explode(',', System::getEnv('_APP_STATS_USAGE_DUAL_WRITING_DBS', ''));
|
if (!System::getEnv('_APP_STATS_USAGE_DUAL_WRITING', false)) {
|
||||||
|
Console::log('Dual Writing is disabled. Skipping...');
|
||||||
$db = $project->getAttribute('database');
|
|
||||||
if (!in_array($db, $databasesToDualWrite)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue