mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2024-11-25 13:30:59 +00:00
Remove actix actor dep from core
This commit is contained in:
parent
ba1a9f422f
commit
57e6a06f00
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "background-jobs-core"
|
name = "background-jobs-core"
|
||||||
description = "Core types for implementing an asynchronous jobs processor"
|
description = "Core types for implementing an asynchronous jobs processor"
|
||||||
version = "0.8.0-alpha.1"
|
version = "0.8.0-alpha.2"
|
||||||
license-file = "../LICENSE"
|
license-file = "../LICENSE"
|
||||||
authors = ["asonix <asonix@asonix.dog>"]
|
authors = ["asonix <asonix@asonix.dog>"]
|
||||||
repository = "https://git.asonix.dog/Aardwolf/background-jobs"
|
repository = "https://git.asonix.dog/Aardwolf/background-jobs"
|
||||||
|
@ -11,10 +11,10 @@ edition = "2018"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
with-actix = ["actix", "tokio"]
|
with-actix = ["actix-rt", "tokio"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix = { version = "0.10.0-alpha.2", optional = true }
|
actix-rt = { version = "1.1.0", optional = true }
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
async-trait = "0.1.24"
|
async-trait = "0.1.24"
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
|
|
@ -102,7 +102,7 @@ where
|
||||||
fn run(self, state: Self::State) -> Self::Future {
|
fn run(self, state: Self::State) -> Self::Future {
|
||||||
let (tx, rx) = oneshot::channel();
|
let (tx, rx) = oneshot::channel();
|
||||||
|
|
||||||
actix::spawn(async move {
|
actix_rt::spawn(async move {
|
||||||
if let Err(_) = tx.send(ActixJob::run(self, state).await) {
|
if let Err(_) = tx.send(ActixJob::run(self, state).await) {
|
||||||
error!("Job dropped");
|
error!("Job dropped");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue