Start using the new job control feature. No need to sleep any more
fixed sleeps. The job scheduler will use epoll_wait timeout for
sleeping instead.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
rrdtool_create_missing_databases(all_rrds);
+ init_max_jobs(0);
+
while (1) {
pr_info("loop start\n");
/*
&all_rrds)))
rrdtool_update_data(db);
- /*
- * Let the updates finish
- */
- if (harvest_zombies(0))
- continue;
-
sleeptime = get_next_update((struct rrd_database **)&all_rrds);
- pr_info("Time to sleep %d seconds\n", sleeptime);
- sleep(sleeptime);
+ pr_info("Time to sleep %d seconds\n", sleeptime);
+ poll_job_requests(sleeptime);
}
return 0;
}