Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
jobmanager
Commits
ddbcd542
Commit
ddbcd542
authored
Nov 27, 2017
by
Julian Rother
Browse files
Merge branch 'master' of git.fsmpi.rwth-aachen.de:videoagwebsite/worker
parents
8f461c1f
f12917b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
manager.py
View file @
ddbcd542
...
...
@@ -67,7 +67,7 @@ api = WorkerApi(os.environ.get("WORKER_APIBASE", "http://127.0.0.1:999999/nourl"
threading
.
Thread
(
target
=
run_scheduler
,
daemon
=
True
).
start
()
@
sched_func
(
5
)
@
sched_func
(
1
5
)
def
ping_website_for_host
():
# ping so the website knows our host is still alive
if
not
api
.
worker_ping
():
...
...
@@ -96,9 +96,9 @@ while True:
continue
j
=
api
.
worker_schedule
(
get_jobtypes
())
if
not
j
:
time
.
sleep
(
1
)
time
.
sleep
(
30
)
continue
print
(
"started jobid %i"
%
j
[
'id'
])
if
str
(
j
[
'type'
])
in
get_jobtypes
():
procs
.
append
(
subprocess
.
Popen
([
workerdir
+
"/"
+
str
(
j
[
'type'
]),
str
(
j
[
'id'
]),
str
(
j
[
'type'
]),
str
(
j
[
'priority'
])
,
str
(
j
[
'data'
])
]
)
)
procs
.
append
(
subprocess
.
Popen
([
workerdir
+
'/'
+
str
(
j
[
'type'
]),
str
(
j
[
'id'
]),
str
(
j
[
'type'
]),
str
(
j
[
'priority'
])
,
str
(
j
[
'data'
])
]
))
time
.
sleep
(
1
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment