diff --git a/.gitmodules b/.gitmodules index 8ec131892e..5506e01d6f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "app/console"] path = app/console url = https://github.com/appwrite/console - branch = 3.2.1 + branch = 3.2.2 diff --git a/app/console b/app/console index 2f47e4e77b..0f9e5e7839 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 2f47e4e77b3c832679c5a83a604dd7b8e8fc1903 +Subproject commit 0f9e5e78396dcfe8b2a02131afe874bd84ba4085 diff --git a/src/Appwrite/Platform/Tasks/CalcTierStats.php b/src/Appwrite/Platform/Tasks/CalcTierStats.php index d660709940..b614f4c8be 100644 --- a/src/Appwrite/Platform/Tasks/CalcTierStats.php +++ b/src/Appwrite/Platform/Tasks/CalcTierStats.php @@ -155,12 +155,12 @@ class CalcTierStats extends Action } /** Get Usage stats */ - $range = '90d'; + $range = '30d'; $periods = [ - '90d' => [ + '30d' => [ 'period' => '1d', - 'limit' => 90, - ], + 'limit' => 30, + ] ]; $tmp = []; @@ -200,8 +200,9 @@ class CalcTierStats extends Action try { /** Get Domains */ - $stats['Domains'] = $dbForConsole->count('domains', [ + $stats['Domains'] = $dbForConsole->count('rules', [ Query::equal('projectInternalId', [$project->getInternalId()]), + Query::limit(APP_LIMIT_COUNT) ]); } catch (\Throwable) { $stats['Domains'] = 0; @@ -246,7 +247,7 @@ class CalcTierStats extends Action if (empty($file)) { continue; } - $filesSum += $dbForProject->sum('bucket_' . $bucket->getInternalId(), 'sizeOriginal', [], 0); + $filesSum += $dbForProject->sum('bucket_' . $bucket->getInternalId(), 'sizeOriginal', []); $filesCount += $dbForProject->count('bucket_' . $bucket->getInternalId(), []); if ($file->getAttribute('sizeOriginal') > $maxFileSize) { $maxFileSize = $file->getAttribute('sizeOriginal');