From 707034153c9f8ad38b297aed6448240a07ac9bab Mon Sep 17 00:00:00 2001 From: voje Date: Wed, 1 May 2019 18:38:35 +0200 Subject: [PATCH] closing db cursor --- src/backend_flask/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend_flask/app.py b/src/backend_flask/app.py index f225f50..670ff4a 100644 --- a/src/backend_flask/app.py +++ b/src/backend_flask/app.py @@ -256,6 +256,7 @@ def api_get_frames(): frames = [] for ent in cur[:QUERY_LIMIT]: frames += frames_from_db_entry(ent) # pre-process this step for prod TODO + cur.close() # filter by relevant hw frames = [x for x in frames if x.hw == hw] @@ -308,6 +309,7 @@ def api_get_functor_frames(): frames = [] for ent in cur[:QUERY_LIMIT]: frames += frames_from_db_entry(ent) # pre-process this step for prod TODO + cur.close() # filter by relevant functor frames = [x for x in frames if functor in x.get_functors()]