From 62b75900b78106b13e6f04faf7e1b5d37e117570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 21 Jun 2023 11:01:44 +0200 Subject: [PATCH] db_info_json: exclude CI logs As the LogsGenerated entry is not automatically created on upload, the entry needs to be created when accessing dbinfo. And as there's frequent CI log uploads, many logs need to be processed and the request times out. These logs are probably not particularly useful anyway. --- app/tornado_handlers/db_info_json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/tornado_handlers/db_info_json.py b/app/tornado_handlers/db_info_json.py index 31d228b61..dcdd5d41e 100644 --- a/app/tornado_handlers/db_info_json.py +++ b/app/tornado_handlers/db_info_json.py @@ -37,8 +37,8 @@ def get(self, *args, **kwargs): db_tuples = cur.fetchall() vehicle_table = {db_tuple[0]: db_tuple[1] for db_tuple in db_tuples} - cur.execute('select Id, Date, Description, WindSpeed, Rating, VideoUrl, ErrorLabels, ' - 'Source, Feedback, Type from Logs where Public = 1') + cur.execute('SELECT Id, Date, Description, WindSpeed, Rating, VideoUrl, ErrorLabels, ' + 'Source, Feedback, Type FROM Logs WHERE Public = 1 AND NOT Source = "CI"') # need to fetch all here, because we will do more SQL calls while # iterating (having multiple cursor's does not seem to work) db_tuples = cur.fetchall()