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
def disconnect():
'''
' On disconnect the session id (sid) of the connection gets placed in the
' disconnected list (see above).
' On disconnect the session id (sid) of the connection gets removed from
' connected sessions list (see above).
'''
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'
'''
logger = logging.getLogger(__name__)
with app.app_context():
user = db.session.query(User).get_or_404(user_id)
''' Get current values from the database. '''
@ -85,7 +84,6 @@ def background_task(app, user_id, session_id, foreign=False):
room=session_id)
''' TODO: Implement maximum runtime for this loop. '''
while session_id in connected_sessions:
logger.warning('Running...')
''' Get current values from the database '''
new_corpora = user.corpora_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
jobs = new_jobs
socketio.sleep(3)
logger.warning('Stoping!')