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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]


## [1.0.0-rc.11] - 2026-10-07

- bump: to v1.0.0-rc.11
- ci(deps): bump cargo-bins/cargo-binstall from 1.23.0 to 1.24.0 ([#115](https://github.com/apalis-dev/apalis-sqlite/pull/115))

## [1.0.0-rc.10] - 2026-10-02

- fix: compile alongside sqlx PostgreSQL driver when pushing tasks (#112)
Expand Down
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis-sqlite"
version = "1.0.0-rc.10"
version = "1.0.0-rc.11"
authors = ["Njuguna Mureithi <mureithinjuguna@gmail.com>"]
readme = "README.md"
edition = "2024"
Expand Down Expand Up @@ -31,21 +31,21 @@ features = ["sqlite"]
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1" }
apalis-codec = { version = "0.1.0-rc.10", default-features = false }
apalis-core = { version = "1.0.0-rc.10", features = ["sleep", "ulid"] }
apalis-codec = { version = "0.1.0-rc.11", default-features = false }
apalis-core = { version = "1.0.0-rc.11", features = ["sleep", "ulid"] }
log = "0.4.34"
futures = "0.3.34"
tokio = { version = "1", features = ["rt", "net"], optional = true }
async-std = { version = "1.13.2", optional = true }
thiserror = "2.0.20"
thiserror = "2.0.21"
pin-project = "1.1.13"
ulid = { version = "3", features = ["serde"] }

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
apalis = { version = "1.0.0-rc.10", features = ["retry"] }
apalis-workflow = { version = "0.1.0-rc.10" }
apalis-codec = { version = "0.1.0-rc.10", features = ["msgpack", "bincode"] }
apalis = { version = "1.0.0-rc.11", features = ["retry", "task-context"] }
apalis-workflow = { version = "0.1.0-rc.11" }
apalis-codec = { version = "0.1.0-rc.11", features = ["msgpack", "bincode"] }
futures-util = "0.3.34"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }

Expand Down
2 changes: 1 addition & 1 deletion examples/unique_jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ async fn main() {
backend.push_task(task_2).await.unwrap();

async fn task(task: u32, worker: WorkerContext) -> Result<(), BoxDynError> {
apalis_core::timer::sleep(std::time::Duration::from_secs(1)).await;
assert_eq!(task, 42);
apalis_core::timer::sleep(std::time::Duration::from_secs(1)).await;
worker.stop()?;
Ok(())
}
Expand Down
16 changes: 16 additions & 0 deletions queries/backend/vacuum_before.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DELETE from
Jobs
WHERE
(
status = 'Done'
OR status = 'Killed'
OR (
status = 'Failed'
AND max_attempts <= attempts
)
)
AND (
run_at < datetime('now', '-' || ?1 || ' seconds')
);

VACUUM;
12 changes: 12 additions & 0 deletions src/queries/vacuum.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use apalis_core::backend::{Backend, Vacuum};

use crate::{Error, SqliteStorage};
Expand All @@ -13,4 +15,14 @@ where
.await?;
Ok(res.rows_affected() as usize)
}

async fn vacuum_before(&mut self, duration: Duration) -> Result<usize, Self::Error> {
let res = sqlx::query_file!(
"queries/backend/vacuum_before.sql",
duration.as_secs() as i64
)
.execute(&self.persistence.pool)
.await?;
Ok(res.rows_affected() as usize)
}
}
4 changes: 2 additions & 2 deletions src/queries/wait_for.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ where
O: Send + 'static + serde::de::DeserializeOwned,
{
type ResultStream = BoxStream<'static, Result<TaskResult<O>, Self::Error>>;
fn wait_for(&self, task_ids: impl IntoIterator<Item = TaskId>) -> Self::ResultStream {
fn wait_for(&mut self, task_ids: impl IntoIterator<Item = TaskId>) -> Self::ResultStream {
let pool = self.persistence.pool.clone();
let ids: HashSet<String> = task_ids.into_iter().map(|id| id.to_string()).collect();

Expand Down Expand Up @@ -74,7 +74,7 @@ where

// Implementation of check_status
fn check_status(
&self,
&mut self,
task_ids: impl IntoIterator<Item = TaskId> + Send,
) -> impl Future<Output = Result<Vec<TaskResult<O>>, Self::Error>> + Send {
let pool = self.persistence.pool.clone();
Expand Down
24 changes: 12 additions & 12 deletions supply-chain/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ version = "0.2.21"
criteria = "safe-to-deploy"

[[exemptions.apalis]]
version = "1.0.0-rc.10"
version = "1.0.0-rc.11"
criteria = "safe-to-run"

[[exemptions.apalis-codec]]
version = "0.1.0-rc.10"
version = "0.1.0-rc.11"
criteria = "safe-to-deploy"

[[exemptions.apalis-core]]
version = "1.0.0-rc.10"
version = "1.0.0-rc.11"
criteria = "safe-to-deploy"

[[exemptions.apalis-sqlite]]
version = "1.0.0-rc.2"
criteria = "safe-to-deploy"

[[exemptions.apalis-workflow]]
version = "0.1.0-rc.10"
version = "0.1.0-rc.11"
criteria = "safe-to-run"

[[exemptions.async-channel]]
Expand Down Expand Up @@ -124,7 +124,7 @@ version = "1.12.1"
criteria = "safe-to-deploy"

[[exemptions.cc]]
version = "1.5.1"
version = "1.6.0"
criteria = "safe-to-deploy"

[[exemptions.cfg-if]]
Expand Down Expand Up @@ -184,7 +184,7 @@ version = "0.2.2"
criteria = "safe-to-deploy"

[[exemptions.ctutils]]
version = "0.4.2"
version = "0.4.3"
criteria = "safe-to-deploy"

[[exemptions.dashmap]]
Expand All @@ -208,7 +208,7 @@ version = "0.15.7"
criteria = "safe-to-deploy"

[[exemptions.either]]
version = "1.18.0"
version = "1.19.0"
criteria = "safe-to-deploy"

[[exemptions.equivalent]]
Expand Down Expand Up @@ -436,7 +436,7 @@ version = "1.5.1"
criteria = "safe-to-run"

[[exemptions.libc]]
version = "0.2.189"
version = "0.2.190"
criteria = "safe-to-deploy"

[[exemptions.libsqlite3-sys]]
Expand Down Expand Up @@ -472,7 +472,7 @@ version = "2.8.3"
criteria = "safe-to-deploy"

[[exemptions.mio]]
version = "1.2.3"
version = "1.2.4"
criteria = "safe-to-deploy"

[[exemptions.native-tls]]
Expand Down Expand Up @@ -776,7 +776,7 @@ version = "1.13.3"
criteria = "safe-to-deploy"

[[exemptions.tokio]]
version = "1.53.1"
version = "1.53.2"
criteria = "safe-to-deploy"

[[exemptions.tokio-macros]]
Expand Down Expand Up @@ -864,7 +864,7 @@ version = "1.0.4"
criteria = "safe-to-deploy"

[[exemptions.uuid]]
version = "1.26.1"
version = "1.27.0"
criteria = "safe-to-deploy"

[[exemptions.valuable]]
Expand Down Expand Up @@ -992,7 +992,7 @@ version = "0.1.8"
criteria = "safe-to-deploy"

[[exemptions.zeroize]]
version = "1.9.0"
version = "1.9.1"
criteria = "safe-to-deploy"

[[exemptions.zerotrie]]
Expand Down
4 changes: 4 additions & 0 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ audited_as = "1.0.0-rc.8"
[[unpublished.apalis-sqlite]]
version = "1.0.0-rc.10"
audited_as = "1.0.0-rc.9"

[[unpublished.apalis-sqlite]]
version = "1.0.0-rc.11"
audited_as = "1.0.0-rc.10"
Loading