Skip to content

Commit

Permalink
loco version support local and normal
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Nov 13, 2024
1 parent 6683ddb commit 124badc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/bgworker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::sync::Arc;

use async_trait::async_trait;
use serde::Serialize;
use tokio_util::sync::CancellationToken;
use tracing::{debug, error};
#[cfg(feature = "bg_pg")]
pub mod pg;
Expand All @@ -21,7 +20,7 @@ pub enum Queue {
Redis(
bb8::Pool<sidekiq::RedisConnectionManager>,
Arc<tokio::sync::Mutex<sidekiq::Processor>>,
CancellationToken,
tokio_util::sync::CancellationToken,
),
#[cfg(feature = "bg_pg")]
Postgres(
Expand All @@ -38,6 +37,7 @@ impl Queue {
/// # Errors
///
/// This function will return an error if fails
#[allow(unused_variables)]
pub async fn enqueue<A: Serialize + Send + Sync>(
&self,
class: String,
Expand Down Expand Up @@ -72,6 +72,7 @@ impl Queue {
/// # Errors
///
/// This function will return an error if fails
#[allow(unused_variables)]
pub async fn register<
A: Serialize + Send + Sync + 'static + for<'de> serde::Deserialize<'de>,
W: BackgroundWorker<A> + 'static,
Expand Down Expand Up @@ -200,8 +201,8 @@ impl Queue {

/// # Errors
///
/// Does not currently return an error, but the postgres or other future queue implementations
/// might, so using Result here as return type.
/// Does not currently return an error, but the postgres or other future
/// queue implementations might, so using Result here as return type.
pub fn shutdown(&self) -> Result<()> {
println!("waiting for running jobs to finish...");
match self {
Expand Down

0 comments on commit 124badc

Please sign in to comment.