mirror of
https://github.com/appwrite/appwrite
synced 2026-05-21 16:08:22 +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)
|
||||
{
|
||||
$databasesToDualWrite = explode(',', System::getEnv('_APP_STATS_USAGE_DUAL_WRITING_DBS', ''));
|
||||
|
||||
$db = $project->getAttribute('database');
|
||||
if (!in_array($db, $databasesToDualWrite)) {
|
||||
if (!System::getEnv('_APP_STATS_USAGE_DUAL_WRITING', false)) {
|
||||
Console::log('Dual Writing is disabled. Skipping...');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue