From 18311c8c9c67bc2b0068c1debb4131969b4fa7c3 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Mon, 25 Sep 2023 13:39:39 +0200 Subject: [PATCH] Use Hostname for cqpserver again... --- app/corpora/cqi_over_sio/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/corpora/cqi_over_sio/__init__.py b/app/corpora/cqi_over_sio/__init__.py index a5564d39..4b55224e 100644 --- a/app/corpora/cqi_over_sio/__init__.py +++ b/app/corpora/cqi_over_sio/__init__.py @@ -122,10 +122,11 @@ class CQiNamespace(Namespace): socketio.sleep(3) retry_counter -= 1 db.session.refresh(db_corpus) - cqpserver_container_name: str = f'cqpserver_{db_corpus_id}' - cqpserver_container: Container = docker_client.containers.get(cqpserver_container_name) - cqpserver_host: str = cqpserver_container.attrs['NetworkSettings']['Networks'][current_app.config['NOPAQUE_DOCKER_NETWORK_NAME']]['IPAddress'] - cqi_client: CQiClient = CQiClient(cqpserver_host) + cqi_client: CQiClient = CQiClient(f'cqpserver_{db_corpus_id}') + # cqpserver_container_name: str = f'cqpserver_{db_corpus_id}' + # cqpserver_container: Container = docker_client.containers.get(cqpserver_container_name) + # cqpserver_host: str = cqpserver_container.attrs['NetworkSettings']['Networks'][current_app.config['NOPAQUE_DOCKER_NETWORK_NAME']]['IPAddress'] + # cqi_client: CQiClient = CQiClient(cqpserver_host) session['cqi_over_sio'] = { 'cqi_client': cqi_client, 'cqi_client_lock': Lock(),