comparison sciworkerd/sciworkerd.c @ 42:4076b07c7a6f

sciworkerd: disable useless messages
author David Demelier <markand@malikania.fr>
date Tue, 09 Aug 2022 14:54:59 +0200
parents e52c762d8ba8
children 95bc6b4ec753
comparison
equal deleted inserted replaced
41:00b9af607524 42:4076b07c7a6f
123 queue(id, tag, project_name); 123 queue(id, tag, project_name);
124 total++; 124 total++;
125 } 125 }
126 } 126 }
127 127
128 log_info(TAG "added %zu new pending tasks", total); 128 if (total)
129 log_info(TAG "added %zu new pending tasks", total);
129 } 130 }
130 131
131 /* 132 /*
132 * Fetch jobs periodically, depending on the user setting. 133 * Fetch jobs periodically, depending on the user setting.
133 */ 134 */
139 struct apic req; 140 struct apic req;
140 json_t *jobs; 141 json_t *jobs;
141 142
142 if (difftime((now = time(NULL)), startup) >= sciworkerd.fetchinterval) { 143 if (difftime((now = time(NULL)), startup) >= sciworkerd.fetchinterval) {
143 startup = now; 144 startup = now;
144 log_info(TAG "fetching jobs"); 145 log_debug(TAG "fetching jobs");
145 146
146 if (!(jobs = apic_job_todo(&req, sciworkerd.name))) 147 if (!(jobs = apic_job_todo(&req, sciworkerd.name)))
147 log_warn(TAG "unable to fetch jobs: %s", req.error); 148 log_warn(TAG "unable to fetch jobs: %s", req.error);
148 else { 149 else {
149 merge(jobs); 150 merge(jobs);