Skip to content

Commit

Permalink
db_info_json: exclude CI logs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bkueng committed Jun 21, 2023
1 parent 352dd3f commit 62b7590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/tornado_handlers/db_info_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 62b7590

Please sign in to comment.