mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 03:11:24 +00:00
Fix time deprecation warnings
This commit is contained in:
parent
ff39c30cc8
commit
700aeb90e0
1 changed files with 2 additions and 3 deletions
|
@ -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!(
|
||||
|
|
Loading…
Reference in a new issue