mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Add some fixes
This commit is contained in:
parent
7efe39cbd5
commit
7233c74dca
@ -5,6 +5,7 @@ from flask import current_app, request
|
|||||||
from flask_login import login_required
|
from flask_login import login_required
|
||||||
from .CQiClient.CQiClient import CQiClient
|
from .CQiClient.CQiClient import CQiClient
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
@socketio.on('init_corpus_analysis')
|
@socketio.on('init_corpus_analysis')
|
||||||
@ -28,7 +29,9 @@ def recv_query(message):
|
|||||||
def observe_corpus_analysis_connection(app, corpus_id, session_id):
|
def observe_corpus_analysis_connection(app, corpus_id, session_id):
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
time.sleep(5) # wait for IP of container only for dev
|
||||||
corpus = Corpus.query.filter_by(id=corpus_id).first()
|
corpus = Corpus.query.filter_by(id=corpus_id).first()
|
||||||
|
logger.warning('IP adress is: {}'.format(corpus.analysis_container_ip))
|
||||||
cqi_client = CQiClient(host=corpus.analysis_container_ip)
|
cqi_client = CQiClient(host=corpus.analysis_container_ip)
|
||||||
cqi_client.ctrl_connect('opaque', 'opaque')
|
cqi_client.ctrl_connect('opaque', 'opaque')
|
||||||
while session_id in connected_sessions:
|
while session_id in connected_sessions:
|
||||||
|
@ -64,8 +64,6 @@ def user_ressource_subscription_handler(app, user_id, session_id,
|
|||||||
' The JSON patches are send as update-* events.
|
' The JSON patches are send as update-* events.
|
||||||
' > where '*' is either 'corpora' or 'jobs'
|
' > where '*' is either 'corpora' or 'jobs'
|
||||||
'''
|
'''
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
logger.warning('user_id: {}, foreign: {}'.format(user_id, foreign))
|
|
||||||
init_events = {'corpora': 'init-foreign-corpora' if foreign
|
init_events = {'corpora': 'init-foreign-corpora' if foreign
|
||||||
else 'init-corpora',
|
else 'init-corpora',
|
||||||
'jobs': 'init-foreign-jobs' if foreign else 'init-jobs'}
|
'jobs': 'init-foreign-jobs' if foreign else 'init-jobs'}
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
analyseBtn.classList.remove('hide');
|
analyseBtn.classList.remove('hide');
|
||||||
analyseBtn.classList.add('disabled');
|
analyseBtn.classList.add('disabled');
|
||||||
}
|
}
|
||||||
if (status === 'prepared' || status === 'start analysis' || status === 'analysing' || status === 'stop analysis') {
|
if (status === 'prepared' || status === 'preparable' || status === 'preparing' || status === 'start analysis' || status === 'analysing' || status === 'stop analysis') {
|
||||||
var prepareBtn = document.getElementById('prepare');
|
var prepareBtn = document.getElementById('prepare');
|
||||||
prepareBtn.classList.add('hide');
|
prepareBtn.classList.add('hide');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user