Remove logs

This commit is contained in:
Patrick Jentsch 2019-11-06 15:35:27 +01:00
parent 5aa777bc11
commit b0cf581da9

View File

@ -35,8 +35,8 @@ def connect():
@login_required @login_required
def disconnect(): def disconnect():
''' '''
' On disconnect the session id (sid) of the connection gets placed in the ' On disconnect the session id (sid) of the connection gets removed from
' disconnected list (see above). ' connected sessions list (see above).
''' '''
connected_sessions.remove(request.sid) connected_sessions.remove(request.sid)
@ -70,7 +70,6 @@ def background_task(app, user_id, session_id, foreign=False):
' '
' > where '*' is either 'corpora' or 'jobs' ' > where '*' is either 'corpora' or 'jobs'
''' '''
logger = logging.getLogger(__name__)
with app.app_context(): with app.app_context():
user = db.session.query(User).get_or_404(user_id) user = db.session.query(User).get_or_404(user_id)
''' Get current values from the database. ''' ''' Get current values from the database. '''
@ -85,7 +84,6 @@ def background_task(app, user_id, session_id, foreign=False):
room=session_id) room=session_id)
''' TODO: Implement maximum runtime for this loop. ''' ''' TODO: Implement maximum runtime for this loop. '''
while session_id in connected_sessions: while session_id in connected_sessions:
logger.warning('Running...')
''' Get current values from the database ''' ''' Get current values from the database '''
new_corpora = user.corpora_as_dict() new_corpora = user.corpora_as_dict()
new_jobs = user.jobs_as_dict() new_jobs = user.jobs_as_dict()
@ -105,4 +103,3 @@ def background_task(app, user_id, session_id, foreign=False):
corpora = new_corpora corpora = new_corpora
jobs = new_jobs jobs = new_jobs
socketio.sleep(3) socketio.sleep(3)
logger.warning('Stoping!')