From 57e6a06f00ad8a5b142b12d1b9f0aa5547e29fd3 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 23 Apr 2020 13:23:09 -0500 Subject: [PATCH] Remove actix actor dep from core --- jobs-core/Cargo.toml | 6 +++--- jobs-core/src/actix_job.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs-core/Cargo.toml b/jobs-core/Cargo.toml index 2c62f20..1b5c2a3 100644 --- a/jobs-core/Cargo.toml +++ b/jobs-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "background-jobs-core" description = "Core types for implementing an asynchronous jobs processor" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" license-file = "../LICENSE" authors = ["asonix "] repository = "https://git.asonix.dog/Aardwolf/background-jobs" @@ -11,10 +11,10 @@ edition = "2018" [features] default = [] -with-actix = ["actix", "tokio"] +with-actix = ["actix-rt", "tokio"] [dependencies] -actix = { version = "0.10.0-alpha.2", optional = true } +actix-rt = { version = "1.1.0", optional = true } anyhow = "1.0" async-trait = "0.1.24" chrono = { version = "0.4", features = ["serde"] } diff --git a/jobs-core/src/actix_job.rs b/jobs-core/src/actix_job.rs index ed1dc89..5887cfa 100644 --- a/jobs-core/src/actix_job.rs +++ b/jobs-core/src/actix_job.rs @@ -102,7 +102,7 @@ where fn run(self, state: Self::State) -> Self::Future { let (tx, rx) = oneshot::channel(); - actix::spawn(async move { + actix_rt::spawn(async move { if let Err(_) = tx.send(ActixJob::run(self, state).await) { error!("Job dropped"); }