Fix event loop

This commit is contained in:
Patrick Jentsch 2019-11-11 09:41:34 +01:00
parent 4b0ef837ad
commit 87b7f07d26

View File

@ -38,7 +38,6 @@ def observe_corpus_analysis_connection(app, corpus_id, session_id):
host='{}_analysis_container{}'.format(corpus.creator.username, corpus.id), port=4877) host='{}_analysis_container{}'.format(corpus.creator.username, corpus.id), port=4877)
analysis_clients[session_id] = analysis_client analysis_clients[session_id] = analysis_client
analysis_client.connect() analysis_client.connect()
logger.warning(analysis_client.corpus_list_corpora())
corpus_name = 'CORPUS' corpus_name = 'CORPUS'
result_subcorpus_name = 'Query-results' # should be set by the user somehow result_subcorpus_name = 'Query-results' # should be set by the user somehow
query = '"and";' query = '"and";'
@ -46,6 +45,7 @@ def observe_corpus_analysis_connection(app, corpus_id, session_id):
logger.warning('Log after create_attribute_strings.') logger.warning('Log after create_attribute_strings.')
analysis_client.query_subcorpus(corpus_name, result_subcorpus_name, query) analysis_client.query_subcorpus(corpus_name, result_subcorpus_name, query)
logger.warning('Log after query_subcorpus.') logger.warning('Log after query_subcorpus.')
analysis_client.show_results(corpus_name)
while session_id in connected_sessions: while session_id in connected_sessions:
logger.warning(analysis_client.ctrl_ping()) logger.warning(analysis_client.ctrl_ping())
socketio.sleep(3) socketio.sleep(3)