From 1f6487237a157e4efe68dc2c2d775c4737ab7a57 Mon Sep 17 00:00:00 2001 From: Bla Date: Thu, 26 Oct 2023 14:12:36 +0000 Subject: [PATCH] minor fix in filter object handling --- server-web.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/server-web.py b/server-web.py index db96478..f3db63a 100644 --- a/server-web.py +++ b/server-web.py @@ -12,9 +12,9 @@ import logging import threading import os -#log = logging.getLogger('werkzeug') -#log.setLevel(logging.ERROR) -#log.disabled = True +log = logging.getLogger('werkzeug') +log.setLevel(logging.ERROR) +log.disabled = True @@ -87,7 +87,7 @@ def nmtid(id): @app.route('/ids') def ids(): l = filter(idIsRecent,list(valuestore.keys())) - return ','.join(map(str,l)) + return ','.join(map(str,list(l))) def createDriver(): options = webdriver.ChromeOptions() @@ -138,9 +138,13 @@ if __name__ == '__main__': del d1 print ("Failover Driver deleted") lastaccess = datetime.now(timezone.utc) + l = filter(idIsRecent,list(valuestore.keys())) - if len(l) < 1: + if len(list(l)) < 1: restartWait = timedelta(seconds=60) + else: + restartWait = timedelta(hours=4) +