Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis-postgres"
version = "1.0.0-alpha.2"
version = "1.0.0-alpha.3"
authors = ["Njuguna Mureithi <mureithinjuguna@gmail.com>"]
edition = "2024"
repository = "https://github.com/apalis-dev/apalis-postgres"
Expand All @@ -22,11 +22,11 @@ tokio-comp = ["tokio", "sqlx/runtime-tokio-rustls"]
tokio-comp-native-tls = ["tokio", "sqlx/runtime-tokio-native-tls"]

[dependencies]
apalis-core = { version = "1.0.0-alpha.7", default-features = false, features = [
apalis-core = { version = "1.0.0-alpha.8", default-features = false, features = [
"sleep",
"json",
] }
apalis-sql = { version = "1.0.0-alpha.7", default-features = false }
apalis-sql = { version = "1.0.0-alpha.8", default-features = false }
serde = { version = "1", features = ["derive"] }
chrono = { version = "0.4", features = ["serde"] }
pin-project = "1.1.10"
Expand All @@ -46,5 +46,5 @@ features = ["chrono", "postgres", "json"]
[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
once_cell = "1.19.0"
apalis-core = { version = "1.0.0-alpha.7", features = ["test-utils"] }
apalis-workflow = { version = "0.1.0-alpha.5" }
apalis-core = { version = "1.0.0-alpha.8", features = ["test-utils"] }
apalis-workflow = { version = "0.1.0-alpha.6" }
5 changes: 4 additions & 1 deletion src/ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ulid::Ulid;

use crate::{PgTask, context::PgContext};

#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct PgAck {
pool: PgPool,
}
Expand Down Expand Up @@ -81,6 +81,8 @@ pub async fn lock_task(pool: &PgPool, task_id: &Ulid, worker_id: &str) -> Result
Ok(())
}

#[derive(Debug, Clone)]

pub struct LockTaskLayer {
pool: PgPool,
}
Expand All @@ -102,6 +104,7 @@ impl<S> Layer<S> for LockTaskLayer {
}
}

#[derive(Debug, Clone)]
pub struct LockTaskService<S> {
inner: S,
pool: PgPool,
Expand Down
3 changes: 1 addition & 2 deletions src/queries/list_workers.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use apalis_core::backend::{Backend, ListWorkers, RunningWorker};
use apalis_sql::{ context::SqlContext};
use apalis_sql::context::SqlContext;
use chrono::{DateTime, Utc};
use futures::TryFutureExt;
use ulid::Ulid;
Expand All @@ -14,7 +14,6 @@ pub struct WorkerRow {
pub started_at: Option<DateTime<Utc>>,
}


use crate::{CompactType, PostgresStorage};

impl<Args: Sync, D, F> ListWorkers for PostgresStorage<Args, CompactType, D, F>
Expand Down
2 changes: 1 addition & 1 deletion src/queries/reenqueue_orphaned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::time::Duration;

use futures::{FutureExt, Stream, stream};
use sqlx::{postgres::types::PgInterval, PgPool};
use sqlx::{PgPool, postgres::types::PgInterval};

use crate::Config;

Expand Down
Loading