From 1554a52bf7df720fe7bb036baef1cb65852ffbca Mon Sep 17 00:00:00 2001 From: shaun Date: Wed, 2 Nov 2016 07:08:33 +1100 Subject: [PATCH] throttling is once every 5 min for an error --- resources/lib/ga_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/ga_client.py b/resources/lib/ga_client.py index 0c70b2f2..8a886fc9 100644 --- a/resources/lib/ga_client.py +++ b/resources/lib/ga_client.py @@ -133,13 +133,13 @@ class GoogleAnalytics(): def sendEventData(self, eventCategory, eventAction, eventLabel=None, throttle=False): - # if throttling is enabled then only log the same event every 60 seconds + # if throttling is enabled then only log the same event every 5 min if(throttle): throttleKey = eventCategory + "-" + eventAction + "-" + str(eventLabel) lastLogged = logEventHistory.get(throttleKey) if(lastLogged != None): timeSinceLastLog = time.time() - lastLogged - if(timeSinceLastLog < 60): + if(timeSinceLastLog < 300): log.info("SKIPPING_LOG_EVENT : " + str(timeSinceLastLog) + " " + throttleKey) return logEventHistory[throttleKey] = time.time()