From c0571c59b84303c881daa881339d9f5f9775028a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 2 Mar 2022 17:38:22 +0545 Subject: [PATCH 1/2] fix --- app/tasks/usage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tasks/usage.php b/app/tasks/usage.php index d68f1f95b1..b659740c14 100644 --- a/app/tasks/usage.php +++ b/app/tasks/usage.php @@ -418,7 +418,7 @@ $cli // Get total storage $dbForProject->setNamespace('_' . $projectId); - $storageTotal = $dbForProject->sum('tags', 'size'); + $storageTotal = $dbForProject->sum('deployments', 'size'); $time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes $id = \md5($time . '_30m_storage.deployments.total'); //Construct unique id for each metric using time, period and metric From 30e3814c096004288bb191118672062edde28882 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 2 Mar 2022 17:39:59 +0545 Subject: [PATCH 2/2] fix storage usage for deployments --- app/controllers/api/storage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 5c61b869ec..b3b175de52 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1580,7 +1580,7 @@ App::get('/v1/storage/usage') ]; $metrics = [ - "storage.tags.total", + "storage.deployments.total", "storage.files.total", "storage.files.count", "storage.buckets.count", @@ -1635,7 +1635,7 @@ App::get('/v1/storage/usage') $usage = new Document([ 'range' => $range, 'filesStorage' => $stats['storage.files.total'], - 'tagsStorage' => $stats['storage.tags.total'], + 'deploymentsStorage' => $stats['storage.deployments.total'], 'filesCount' => $stats['storage.files.count'], 'bucketsCount' => $stats['storage.buckets.count'], 'bucketsCreate' => $stats['storage.buckets.create'],