Use IP instead of Hostname again...

This commit is contained in:
Patrick Jentsch 2023-09-25 13:43:17 +02:00
parent 18311c8c9c
commit b50147a66a

View File

@ -122,11 +122,11 @@ class CQiNamespace(Namespace):
socketio.sleep(3)
retry_counter -= 1
db.session.refresh(db_corpus)
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)
# 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(),