Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
b0cf581d
Commit
b0cf581d
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Remove logs
parent
5aa777bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/events.py
+2
-5
2 additions, 5 deletions
app/events.py
with
2 additions
and
5 deletions
app/events.py
+
2
−
5
View file @
b0cf581d
...
...
@@ -35,8 +35,8 @@ def connect():
@login_required
def
disconnect
():
'''
'
On disconnect the session id (sid) of the connection gets
placed in the
'
dis
connected 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!
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment