Commit f12917b8 authored by Andreas Valder's avatar Andreas Valder

reduced load produced by workers

parent 2e021a88
......@@ -38,7 +38,7 @@ api = WorkerApi(config['API']['BASE'],config['API']['KEY'])
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():
......@@ -58,7 +58,8 @@ while True:
continue
j = api.worker_schedule(config['JOBS']['TYPES'])
if not j:
time.sleep(1)
time.sleep(30)
continue
print("started jobid %i"%j['id'])
procs.append(subprocess.Popen(['./worker.py', 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