From dc3f7b2c62550b9ef88907fddf31894576675e8d Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 8 Jan 2024 16:37:32 -0600 Subject: [PATCH] Remove dependency on tracing-futures --- jobs-actix/Cargo.toml | 1 - jobs-actix/src/worker.rs | 3 +-- jobs-core/Cargo.toml | 1 - jobs-core/src/job.rs | 3 +-- jobs-core/src/processor_map.rs | 3 +-- jobs-core/src/unsend_job.rs | 3 +-- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/jobs-actix/Cargo.toml b/jobs-actix/Cargo.toml index 1abe9b8..c30f1f6 100644 --- a/jobs-actix/Cargo.toml +++ b/jobs-actix/Cargo.toml @@ -16,7 +16,6 @@ async-trait = "0.1.24" background-jobs-core = { version = "0.17.0", path = "../jobs-core" } metrics = "0.22.0" tracing = "0.1" -tracing-futures = "0.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" diff --git a/jobs-actix/src/worker.rs b/jobs-actix/src/worker.rs index 9fa86f6..480fb4f 100644 --- a/jobs-actix/src/worker.rs +++ b/jobs-actix/src/worker.rs @@ -1,8 +1,7 @@ use crate::Server; use background_jobs_core::CachedProcessorMap; use std::future::Future; -use tracing::Span; -use tracing_futures::Instrument; +use tracing::{Instrument, Span}; use uuid::Uuid; struct LocalWorkerStarter { diff --git a/jobs-core/Cargo.toml b/jobs-core/Cargo.toml index c86945a..a54bee3 100644 --- a/jobs-core/Cargo.toml +++ b/jobs-core/Cargo.toml @@ -21,7 +21,6 @@ event-listener = "4" metrics = "0.22.0" time = { version = "0.3", features = ["serde-human-readable"] } tracing = "0.1" -tracing-futures = "0.2.5" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" diff --git a/jobs-core/src/job.rs b/jobs-core/src/job.rs index 0f64840..a973c99 100644 --- a/jobs-core/src/job.rs +++ b/jobs-core/src/job.rs @@ -3,8 +3,7 @@ use anyhow::Error; use serde::{de::DeserializeOwned, ser::Serialize}; use serde_json::Value; use std::{future::Future, pin::Pin, time::SystemTime}; -use tracing::Span; -use tracing_futures::Instrument; +use tracing::{Instrument, Span}; /// The Job trait defines parameters pertaining to an instance of background job /// diff --git a/jobs-core/src/processor_map.rs b/jobs-core/src/processor_map.rs index 30e0673..f6e38cd 100644 --- a/jobs-core/src/processor_map.rs +++ b/jobs-core/src/processor_map.rs @@ -4,8 +4,7 @@ use std::{ collections::HashMap, future::Future, panic::AssertUnwindSafe, pin::Pin, sync::Arc, time::Instant, }; -use tracing::Span; -use tracing_futures::Instrument; +use tracing::{Instrument, Span}; use uuid::Uuid; /// A generic function that processes a job diff --git a/jobs-core/src/unsend_job.rs b/jobs-core/src/unsend_job.rs index 3da1d30..1eb63e4 100644 --- a/jobs-core/src/unsend_job.rs +++ b/jobs-core/src/unsend_job.rs @@ -7,8 +7,7 @@ use std::{ pin::Pin, task::{Context, Poll}, }; -use tracing::Span; -use tracing_futures::Instrument; +use tracing::{Instrument, Span}; #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] /// The type produced when a task is dropped before completion as a result of being deliberately