From 700aeb90e03e1ea511c7fccc5e7a6ba7130424f2 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 1 May 2024 14:33:07 -0500 Subject: [PATCH] Fix time deprecation warnings --- src/queue/process.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/queue/process.rs b/src/queue/process.rs index b2343d6..3b10f93 100644 --- a/src/queue/process.rs +++ b/src/queue/process.rs @@ -1,4 +1,3 @@ -use time::Instant; use tracing::{Instrument, Span}; use crate::{ @@ -13,7 +12,7 @@ use crate::{ store::Store, UploadQuery, }; -use std::sync::Arc; +use std::{sync::Arc, time::Instant}; use super::{JobContext, JobFuture, JobResult}; @@ -90,7 +89,7 @@ impl UploadGuard { impl Drop for UploadGuard { fn drop(&mut self) { metrics::counter!(crate::init_metrics::BACKGROUND_UPLOAD_INGEST, "completed" => (!self.armed).to_string()).increment(1); - metrics::histogram!(crate::init_metrics::BACKGROUND_UPLOAD_INGEST_DURATION, "completed" => (!self.armed).to_string()).record(self.start.elapsed().as_seconds_f64()); + metrics::histogram!(crate::init_metrics::BACKGROUND_UPLOAD_INGEST_DURATION, "completed" => (!self.armed).to_string()).record(self.start.elapsed().as_secs_f64()); if self.armed { tracing::warn!(