Skip to content
Snippets Groups Projects
Commit 54c0d0f2 authored by Stephan Porada's avatar Stephan Porada :speech_balloon:
Browse files

Fix app context

parent 76fcb011
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@ def recv_query(message):
def observe_corpus_analysis_connection(app, corpus_id, session_id):
logger = logging.getLogger(__name__)
corpus = Corpus.query.filter_by(id=corpus_id).first()
with app.app_context():
corpus = Corpus.query.filter_by(id=corpus_id).first()
cqi_client = CQiClient(host=corpus.analysis_container_ip)
cqi_client.ctrl_connect('opaque', 'opaque')
while session_id in connected_sessions:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment