Skip to content
Snippets Groups Projects
Commit f12917b8 authored by Andreas Valder's avatar Andreas Valder
Browse files

reduced load produced by workers

parent 2e021a88
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment