From 2dbc15f3fa4366b410fe315d460f24506d7ea1ff Mon Sep 17 00:00:00 2001 From: geofmureithi Date: Sat, 1 Nov 2025 16:11:34 +0300 Subject: [PATCH 1/2] chore: bump to 1.0.0-alpha.3 --- Cargo.toml | 10 +++++----- src/ack.rs | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5ae805e..57d04b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apalis-postgres" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" authors = ["Njuguna Mureithi "] edition = "2024" repository = "https://github.com/apalis-dev/apalis-postgres" @@ -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" @@ -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" } diff --git a/src/ack.rs b/src/ack.rs index 5c1fa10..77d7169 100644 --- a/src/ack.rs +++ b/src/ack.rs @@ -11,7 +11,7 @@ use ulid::Ulid; use crate::{PgTask, context::PgContext}; -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct PgAck { pool: PgPool, } @@ -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, } @@ -102,6 +104,8 @@ impl Layer for LockTaskLayer { } } +#[derive(Debug, Clone)] + pub struct LockTaskService { inner: S, pool: PgPool, From a6ca30068030947088c4f7b6e73a68bd0a723aa5 Mon Sep 17 00:00:00 2001 From: geofmureithi Date: Sat, 1 Nov 2025 16:13:01 +0300 Subject: [PATCH 2/2] lint: cargo fmt --- src/ack.rs | 1 - src/queries/list_workers.rs | 3 +-- src/queries/reenqueue_orphaned.rs | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ack.rs b/src/ack.rs index 77d7169..817c7ee 100644 --- a/src/ack.rs +++ b/src/ack.rs @@ -105,7 +105,6 @@ impl Layer for LockTaskLayer { } #[derive(Debug, Clone)] - pub struct LockTaskService { inner: S, pool: PgPool, diff --git a/src/queries/list_workers.rs b/src/queries/list_workers.rs index 1d7ebfd..0c4c757 100644 --- a/src/queries/list_workers.rs +++ b/src/queries/list_workers.rs @@ -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; @@ -14,7 +14,6 @@ pub struct WorkerRow { pub started_at: Option>, } - use crate::{CompactType, PostgresStorage}; impl ListWorkers for PostgresStorage diff --git a/src/queries/reenqueue_orphaned.rs b/src/queries/reenqueue_orphaned.rs index e2cd953..2c3b012 100644 --- a/src/queries/reenqueue_orphaned.rs +++ b/src/queries/reenqueue_orphaned.rs @@ -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;