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
4 changes: 4 additions & 0 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- '**/deny.toml'

pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/deny.toml'
workflow_call:


Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
on:
push:
branches: [main, develop]
paths:
- "**/Cargo.toml"
- "**/*.rs"
pull_request:
paths:
- "**/Cargo.lock"
- "**/Cargo.toml"
- "**/*.rs"
workflow_call:

name: Check and Test
Expand Down Expand Up @@ -47,7 +54,6 @@ jobs:
command: test
args: --all


fmt:
name: Rustfmt
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project are documented in this file.

## [Unreleased]

- *bump*: to v1.0.0-rc.10 ([#775](https://github.com/apalis-dev/apalis/pull/775))
- ci(deps): bump actions/cache from 4 to 6 ([#752](https://github.com/apalis-dev/apalis/pull/752))
- **chore (api)!**: standardize execution context ([#751](https://github.com/apalis-dev/apalis/pull/751))
- **chore**: bump opentelemetry_sdk ([#750](https://github.com/apalis-dev/apalis/pull/750))
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion apalis-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis-core"
version = "1.0.0-rc.9"
version = "1.0.0-rc.10"
authors = ["Njuguna Mureithi <mureithinjuguna@gmail.com>"]
edition.workspace = true
repository.workspace = true
Expand Down
20 changes: 10 additions & 10 deletions apalis-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Specific documentation for tasks can be found in the [`task`] and [`task::builde

##### Relevant Guides:

- [**Defining Task arguments**](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/task_fn/guide/index.html) - Creating effective task arguments that are scalable and type-safe
- [**Defining Task arguments**](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/task_fn/guide/index.html) - Creating effective task arguments that are scalable and type-safe

### Backends

The [`Backend`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/backend/trait.Backend.html) trait serves as the core abstraction for all task sources.
The [`Backend`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/backend/trait.Backend.html) trait serves as the core abstraction for all task sources.
It defines task polling mechanisms, streaming interfaces, and middleware integration points.

<details>
Expand All @@ -68,16 +68,16 @@ It defines task polling mechanisms, streaming interfaces, and middleware integra

#### Inbuilt Implementations

- [`MemoryStorage`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/backend/memory/struct.MemoryStorage.html) : In-memory storage based on channels
- [`Pipe`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/backend/pipe/index.html) : Pipe-based backend for a stream-to-backend pipeline
- [`CustomBackend`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/backend/custom/index.html) : Flexible backend composition allowing custom functions for task management
- [`MemoryStorage`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/backend/memory/struct.MemoryStorage.html) : In-memory storage based on channels
- [`Pipe`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/backend/pipe/index.html) : Pipe-based backend for a stream-to-backend pipeline
- [`CustomBackend`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/backend/custom/index.html) : Flexible backend composition allowing custom functions for task management

Backends handle task persistence, distribution, and reliability concerns while providing
a uniform interface for worker consumption.

### Workers

The [`Worker`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/worker/index.html) is the core runtime component responsible for task polling, execution, and lifecycle management:
The [`Worker`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/worker/index.html) is the core runtime component responsible for task polling, execution, and lifecycle management:

#### Worker Lifecycle

Expand All @@ -94,7 +94,7 @@ The following are the main components the worker module:
- [`Worker`] - Actual worker implementation that processes tasks
- [`WorkerContext`] - Runtime state including task counts and execution status
- [`Event`] - Worker event enumeration (`Start`, `Engage`, `Idle`, `Error`, `Stop`)
- [`Ext`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/worker/ext/index.html) - Extension traits and middleware for adding functionality to workers
- [`Ext`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/worker/ext/index.html) - Extension traits and middleware for adding functionality to workers

#### Example: Building and Running a Worker

Expand Down Expand Up @@ -129,11 +129,11 @@ Learn more about workers in the [`worker`](crate::worker) and [`worker::builder`
##### Relevant Tutorials:

- [**Creating task handlers**](crate::task::task_fn) - Defining task processing functions using the [`TaskFn`] trait
- [**Testing task handlers with `TestWorker`**](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/worker/test_worker/index.html) - Specialized worker implementation for unit and integration testing
- [**Testing task handlers with `TestWorker`**](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/worker/test_worker/index.html) - Specialized worker implementation for unit and integration testing

### Monitor

The [`Monitor`](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/monitor/struct.Monitor.html) helps manage and coordinate multiple workers:
The [`Monitor`](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/monitor/struct.Monitor.html) helps manage and coordinate multiple workers:

**Main Features:**

Expand Down Expand Up @@ -166,7 +166,7 @@ async fn main() {
}
```

Learn more about the monitor in the [`monitor` module](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/monitor/index.html.
Learn more about the monitor in the [`monitor` module](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/monitor/index.html.

### Middleware

Expand Down
4 changes: 2 additions & 2 deletions apalis-workflow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis-workflow"
version = "0.1.0-rc.9"
version = "0.1.0-rc.10"
edition.workspace = true
repository.workspace = true
authors = ["Njuguna Mureithi <mureithinjuguna@gmail.com>"]
Expand All @@ -18,7 +18,7 @@ petgraph = { version = "0.8.3", features = ["serde-1"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
tower = { version = "0.5", features = ["util"], default-features = false }
apalis-core = { path = "../apalis-core", version = "1.0.0-rc.9", default-features = false, features = [
apalis-core = { path = "../apalis-core", version = "1.0.0-rc.10", default-features = false, features = [
"sleep",
"serde",
] }
Expand Down
6 changes: 3 additions & 3 deletions apalis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis"
version = "1.0.0-rc.9"
version = "1.0.0-rc.10"
authors = ["Geoffrey Mureithi <mureithinjuguna@gmail.com>"]
description = "Simple, extensible and multithreaded background task processing for Rust"
edition.workspace = true
Expand Down Expand Up @@ -71,7 +71,7 @@ full = [
docsrs = ["document-features"]

[dependencies.apalis-core]
version = "1.0.0-rc.9"
version = "1.0.0-rc.10"
default-features = false
path = "../apalis-core"

Expand Down Expand Up @@ -103,7 +103,7 @@ version = "0.1.44"
optional = true

[dev-dependencies]
apalis-core = { path = "../apalis-core", version = "1.0.0-rc.9" }
apalis-core = { path = "../apalis-core", version = "1.0.0-rc.10" }
serde = "1"
tokio = { version = "1", features = ["full"] }
tracing-subscriber = { version = "0.3.23", default-features = false, features = [
Expand Down
6 changes: 3 additions & 3 deletions apalis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

## Features

- **Simple, predictable task handling** - [Task handlers](https://docs.rs/apalis-core/1.0.0-rc.9/apalis_core/task/task_fn/index.html) are just async functions, with a macro-free API
- **Simple, predictable task handling** - [Task handlers](https://docs.rs/apalis-core/1.0.0-rc.10/apalis_core/task/task_fn/index.html) are just async functions, with a macro-free API
- **Robust task execution** - Built-in retries, rate limiting, timeouts, idempotency, and error handling
- **Multiple storage backends** - Redis, PostgreSQL, SQLite, and in-memory storage
- **Advanced task management** - Prioritization, scheduling, metadata, and result tracking
Expand Down Expand Up @@ -65,8 +65,8 @@

```toml
[dependencies]
apalis = { version = "1.0.0-rc.9" }
# apalis-redis = { version = "1.0.0-rc.9" } # Use redis/sqlite/postgres etc
apalis = { version = "1.0.0-rc.10" }
# apalis-redis = { version = "1.0.0-rc.10" } # Use redis/sqlite/postgres etc
```

## Usage
Expand Down Expand Up @@ -115,7 +115,7 @@
use apalis::prelude::*;
use apalis_workflow::*;
use std::time::Duration;
use apalis_file_storage::JsonStorage;;

Check warning on line 118 in apalis/README.md

View workflow job for this annotation

GitHub Actions / Test Suite

the `main` function of this doctest won't be run as it contains expressions at the top level, meaning that the whole doctest code will be wrapped in a function

#[tokio::main]
async fn main() {
Expand Down
6 changes: 3 additions & 3 deletions supply-chain/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ version = "1.0.104"
criteria = "safe-to-deploy"

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

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

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

[[exemptions.atomic-waker]]
Expand Down
4 changes: 2 additions & 2 deletions utils/apalis-codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis-codec"
version = "0.1.0-rc.9"
version = "0.1.0-rc.10"
rust-version.workspace = true
edition.workspace = true
repository.workspace = true
Expand All @@ -21,7 +21,7 @@ bincode = ["dep:bincode", "dep:thiserror"]
msgpack = ["dep:rmp-serde", "dep:serde", "apalis-core/serde", "dep:thiserror"]

[dependencies]
apalis-core = { path = "../../apalis-core", version = "1.0.0-rc.9", default-features = false }
apalis-core = { path = "../../apalis-core", version = "1.0.0-rc.10", default-features = false }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
bincode = { version = "2.0.1", optional = true }
Expand Down
8 changes: 4 additions & 4 deletions utils/apalis-file-storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "apalis-file-storage"
version = "0.1.0-rc.9"
version = "0.1.0-rc.10"
rust-version.workspace = true
edition.workspace = true
repository.workspace = true
authors = ["Njuguna Mureithi <mureithinjuguna@gmail.com>"]
license = "MIT"
description = "A test-friendly single process file-based storage backend for apalis"
description = "A file-based backend for apalis that supports json and csv"
publish = true
documentation = "https://docs.rs/apalis-file-storage"
keywords = ["apalis", "file", "storage", "backend", "rust"]
Expand All @@ -16,7 +16,7 @@ categories = ["database", "filesystem", "asynchronous", "data-structures"]

[dependencies]
serde = { version = "1.0.229", features = ["derive"] }
apalis-core = { path = "../../apalis-core", version = "1.0.0-rc.9", default-features = false, features = [
apalis-core = { path = "../../apalis-core", version = "1.0.0-rc.10", default-features = false, features = [
"sleep",
"serde",
] }
Expand All @@ -33,7 +33,7 @@ futures-util = { version = "0.3.34", features = [
"std",
], default-features = false }
futures-core = { version = "0.3.34", default-features = false }
apalis-codec = { path = "../apalis-codec", version = "0.1.0-rc.9", default-features = false, features = [
apalis-codec = { path = "../apalis-codec", version = "0.1.0-rc.10", default-features = false, features = [
"json",
] }
tempfile = "3.27.0"
Expand Down
Loading