aboutsummaryrefslogtreecommitdiff
path: root/src/util/background/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/background/mod.rs')
-rw-r--r--src/util/background/mod.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/util/background/mod.rs b/src/util/background/mod.rs
index 0bb4fb67..41b48e93 100644
--- a/src/util/background/mod.rs
+++ b/src/util/background/mod.rs
@@ -2,20 +2,15 @@
pub mod worker;
-use core::future::Future;
-
use std::collections::HashMap;
use std::sync::Arc;
use serde::{Deserialize, Serialize};
use tokio::sync::{mpsc, watch};
-use crate::error::Error;
use worker::WorkerProcessor;
pub use worker::{Worker, WorkerState};
-pub(crate) type JobOutput = Result<(), Error>;
-
/// Job runner for futures and async functions
pub struct BackgroundRunner {
send_worker: mpsc::UnboundedSender<Box<dyn Worker>>,
@@ -77,14 +72,3 @@ impl BackgroundRunner {
.expect("Could not put worker in queue");
}
}
-
-pub fn spawn<T>(job: T)
-where
- T: Future<Output = JobOutput> + Send + 'static,
-{
- tokio::spawn(async move {
- if let Err(e) = job.await {
- error!("{}", e);
- }
- });
-}