From b145477114db5f6c5c10e0793aa8bbacfac6cc70 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 12 Dec 2024 12:30:36 +0200 Subject: [PATCH] payload bug fix --- src/Appwrite/Platform/Workers/Usage.php | 2 +- src/Appwrite/Platform/Workers/UsageDump.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Usage.php b/src/Appwrite/Platform/Workers/Usage.php index 3f24210cea..cdbb7b5aaa 100644 --- a/src/Appwrite/Platform/Workers/Usage.php +++ b/src/Appwrite/Platform/Workers/Usage.php @@ -75,7 +75,7 @@ class Usage extends Action } $this->stats[$projectId]['project'] = [ - '$uid' => $project->getId(), + '$id' => $project->getId(), '$internalId' => $project->getInternalId(), 'database' => $project->getAttribute('database'), ]; diff --git a/src/Appwrite/Platform/Workers/UsageDump.php b/src/Appwrite/Platform/Workers/UsageDump.php index b5480e1dec..9fbef8f1b8 100644 --- a/src/Appwrite/Platform/Workers/UsageDump.php +++ b/src/Appwrite/Platform/Workers/UsageDump.php @@ -66,9 +66,9 @@ class UsageDump extends Action continue; } - console::log('[' . DateTime::now() . '] ProjectId [' . $project->getInternalId() . '] ReceivedAt [' . $receivedAt . '] ' . $numberOfKeys . ' keys'); - try { + console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getInternalId(). ' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + $dbForProject = $getProjectDB($project); foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) {