From 87e3916568d8acb13efdeb228ebbd272326c7738 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 9 Sep 2022 07:52:57 +0000 Subject: [PATCH] fix the latest time memory store --- src/Appwrite/Usage/Calculators/TimeSeries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Usage/Calculators/TimeSeries.php b/src/Appwrite/Usage/Calculators/TimeSeries.php index c2a6b4a141..01c8661206 100644 --- a/src/Appwrite/Usage/Calculators/TimeSeries.php +++ b/src/Appwrite/Usage/Calculators/TimeSeries.php @@ -323,7 +323,6 @@ class TimeSeries extends Calculator $document->setAttribute('value', $value) ); } - $this->latestTime[$metric][$period] = $time; } catch (\Exception $e) { // if projects are deleted this might fail if (is_callable($this->errorHandler)) { call_user_func($this->errorHandler, $e, "sync_project_{$projectId}_metric_{$metric}"); @@ -397,6 +396,7 @@ class TimeSeries extends Calculator $value, 0 ); + $this->latestTime[$metric][$period['key']] = $point['time']; } } } catch (\Exception $e) { // if projects are deleted this might fail