From 3788d5bcebc3eb7709d9bb4f3de6d6f500e5bd70 Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 9 Feb 2024 12:56:37 +0200 Subject: [PATCH] interval update --- src/Appwrite/Platform/Workers/Usage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Usage.php b/src/Appwrite/Platform/Workers/Usage.php index 8a9c322c80..8490c31c0a 100644 --- a/src/Appwrite/Platform/Workers/Usage.php +++ b/src/Appwrite/Platform/Workers/Usage.php @@ -85,6 +85,10 @@ class Usage extends Action $this->stats[$projectId]['keys'][$metric['key']] += $metric['value']; } + var_dump(time() - $this->lastTriggeredTime > $aggregationInterval); + var_dump(time() - $this->lastTriggeredTime); + var_dump($aggregationInterval); + var_dump($this->keys); // if keys crossed threshold or X time passed since the last send and there are some keys in the array ($this->stats) if ( $this->keys >= self::KEYS_THRESHOLD ||