Exemplo n.º 1
0
static void carbon_push(struct uwsgi_stats_pusher_instance *uspi, time_t now, char *json, size_t json_len) {

	if (u_carbon.need_retry && now >= u_carbon.next_retry) {
		carbon_push_stats(1, now);
	}
	else {
		// update
		u_carbon.need_retry = 0;
		carbon_push_stats(0, now);

	}
}
Exemplo n.º 2
0
void carbon_master_cycle() {

	if (!u_carbon.servers) return;

	if (uwsgi.current_time - u_carbon.last_update >= u_carbon.freq || uwsgi.cleaning) {
		// update
		u_carbon.need_retry = 0;
		carbon_push_stats(0);
	} else if (u_carbon.need_retry && (uwsgi.current_time >= u_carbon.next_retry)) {
		// retry failed servers
		carbon_push_stats(1);
	}
}
Exemplo n.º 3
0
static void carbon_cleanup() {
	carbon_push_stats(0, uwsgi_now());
}