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
34499643
Commit
34499643
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Put execute_flag into enviroment file
parent
4727ce32
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/nopaqued.py
+5
-2
5 additions, 2 deletions
daemon/nopaqued.py
nopaque.env.tpl
+1
-0
1 addition, 0 deletions
nopaque.env.tpl
with
6 additions
and
2 deletions
daemon/nopaqued.py
+
5
−
2
View file @
34499643
...
...
@@ -2,6 +2,7 @@ from concurrent.futures import ThreadPoolExecutor
from
tasks.check_corpora
import
check_corpora
from
tasks.check_jobs
import
check_jobs
from
tasks.notify
import
notify
import
os
# TODO: Check if thread is still alive and execute next thread after that
...
...
@@ -9,13 +10,15 @@ from tasks.notify import notify
def
nopaqued
():
execute_notifications
=
os
.
environ
.
get
(
'
NOPAQUE_EXECUTE_NOTIFICATIONS
'
)
# executing background functions
while
True
:
with
ThreadPoolExecutor
(
max_workers
=
3
)
as
executor
:
executor
.
submit
(
check_jobs
)
executor
.
submit
(
check_corpora
)
executor
.
submit
(
notify
,
True
)
# If True mails are sent.
# If False no mails are sent.
executor
.
submit
(
notify
,
execute_notifications
)
# If execute_notifications True mails are sent.
# If execute_notifications False no mails are sent.
# But notification status will be set nonetheless.
...
...
This diff is collapsed.
Click to expand it.
nopaque.env.tpl
+
1
−
0
View file @
34499643
...
...
@@ -27,6 +27,7 @@ NOPAQUE_DOMAIN=
NOPAQUE_LOG_LEVEL=
NOPAQUE_MAIL_SENDER=
NOPAQUE_STORAGE=
NOPAQUE_EXECUTE_NOTIFICATIONS=
### PostgreSQL ###
POSTGRES_DB_NAME=
...
...
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