add more metrics

This commit is contained in:
Ruben Fiszel
2022-12-13 00:25:27 +01:00
parent 48ca1e939c
commit d813c007c0

View File

@@ -493,7 +493,10 @@ pub async fn run_worker(
.await
.map_err(|_| Error::InternalErr("Impossible to fetch same_worker job".to_string())))
},
job = { let _timer = worker_pull_duration.start_timer(); pull(&db) } => (false, job),
(job, timer) = {let timer = worker_pull_duration.start_timer(); pull(&db).map(|x| (x, timer)) } => {
drop(timer);
(false, job)
},
}
}.instrument(trace_span!("worker_get_next_job")).await;
if do_break {