Merge branch 'cl-1.4.x' of github.com:appwrite/appwrite into refactor-workers-sn

This commit is contained in:
shimon
2023-10-16 17:03:43 +03:00
3 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 3.2.1
branch = 3.2.2
@@ -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');