Skip to content
Snippets Groups Projects
Commit ddbcd542 authored by Julian Rother's avatar Julian Rother
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:videoagwebsite/worker

parents 8f461c1f f12917b8
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ api = WorkerApi(os.environ.get("WORKER_APIBASE", "http://127.0.0.1:999999/nourl" ...@@ -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() threading.Thread(target=run_scheduler, daemon=True).start()
@sched_func(5) @sched_func(15)
def ping_website_for_host(): def ping_website_for_host():
# ping so the website knows our host is still alive # ping so the website knows our host is still alive
if not api.worker_ping(): if not api.worker_ping():
...@@ -96,9 +96,9 @@ while True: ...@@ -96,9 +96,9 @@ while True:
continue continue
j = api.worker_schedule(get_jobtypes()) j = api.worker_schedule(get_jobtypes())
if not j: if not j:
time.sleep(1) time.sleep(30)
continue continue
print("started jobid %i"%j['id']) print("started jobid %i"%j['id'])
if str(j['type']) in get_jobtypes(): if str(j['type']) in get_jobtypes():
procs.append(subprocess.Popen([workerdir+"/"+str(j['type']), str(j['id']), procs.append(subprocess.Popen([workerdir+'/'+str(j['type']), str(j['id']), str(j['type']), str(j['priority']) , str(j['data']) ] ))
str(j['type']), str(j['priority']) , str(j['data']) ] )) time.sleep(1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment