From d0985db27dc00de6b953ac96e8d6c6a0e24abc30 Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 9 Feb 2024 13:22:48 +0200 Subject: [PATCH] interval update --- src/Appwrite/Platform/Workers/Usage.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Usage.php b/src/Appwrite/Platform/Workers/Usage.php index 8490c31c0a..d65ab0968d 100644 --- a/src/Appwrite/Platform/Workers/Usage.php +++ b/src/Appwrite/Platform/Workers/Usage.php @@ -85,10 +85,7 @@ 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 ||