Commit ddbcd542 authored by Julian Rother's avatar Julian Rother

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

parents 8f461c1f f12917b8
......@@ -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(15)
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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment