Skip to content

Commit b3055bd

Browse files
authored
bump: to v1.0.0 (#792)
* bump: to v1.0.0 * docs: update CHANGELOG for PR #792
1 parent a28c5c2 commit b3055bd

14 files changed

Lines changed: 183 additions & 94 deletions

File tree

‎.github/workflows/audit.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ jobs:
5959
with:
6060
path: ~/.cargo/bin/cargo-deny
6161
key: cargo-deny-${{ runner.os }}
62-
- run: cargo install cargo-deny --locked
62+
- run: cargo install cargo-deny --locked --force
6363
- run: cargo deny check

‎CHANGELOG.md‎

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,64 @@ All notable changes to this project are documented in this file.
44

55
## [Unreleased]
66

7-
- *bump*: to v1.0.0-rc.12 ([#791](https://github.com/apalis-dev/apalis/pull/791))
8-
- *bump*: to v1.0.0-rc.11 ([#790](https://github.com/apalis-dev/apalis/pull/790))
7+
## [1.0.0](https://github.com/apalis-dev/apalis/releases/tag/v1.0.0)
8+
9+
- *bump*: to v1.0.0 ([#792](https://github.com/apalis-dev/apalis/pull/792))
10+
11+
### Upgrading to v1.0
12+
13+
Migrating from 0.7.x to 1.0.0 Start with the renames, then check the sections that match what you use.
14+
15+
#### Renames
16+
17+
| Before | After | PR |
18+
| ------------------------- | ----------------------- | ------ |
19+
| `service_fn` | `taskfn` | [#586] |
20+
| `WorkerContext::id()` | `WorkerContext::name()` | [#586] |
21+
| `Pipe::pipe_to_storage` | `PipeExt::pipe_to` | [#586] |
22+
| `Parts<Ctx, Id>` | `ExecutionContext` | [#751] |
23+
| `Task<Args, Ctx, IdType>` | `Task<Args>` | [#751] |
24+
25+
#### Worker and Monitor
26+
27+
**`Backend` is now the second input to `WorkerBuilder`** ([#586], [#755])
28+
29+
`Backend` now uses Rust's default poll-based mechanism and is standardized (see also [#772]: `BackendConfig` and `WireFormatBackend`).
30+
31+
```rust
32+
// Before
33+
WorkerBuilder::new("tasty-banana")
34+
.backend(sqlite)
35+
.build(service_fn(task));
36+
37+
// After
38+
WorkerBuilder::new("tasty-banana")
39+
.backend(sqlite)
40+
// default middleware: .layer / .data
41+
.build(task_fn);
42+
```
43+
44+
**`Monitor` factories receive the worker run count** ([#586])
45+
46+
```rust
47+
// Before
48+
Monitor::new().register(WorkerBuilder::new("tasty-banana") /* ... */)
49+
50+
// After
51+
Monitor::new().register(|runs: usize| WorkerBuilder::new("tasty-banana") /* ... */)
52+
```
53+
54+
#### Tasks and metadata
55+
56+
- Metadata is now a key-value store ([#747]).
57+
- Queue input removed from exposed endpoints ([#741]).
58+
59+
#### PR breakdown
60+
61+
- _bump_: to v1.0.0-rc.12 ([#791](https://github.com/apalis-dev/apalis/pull/791))
62+
- _bump_: to v1.0.0-rc.11 ([#790](https://github.com/apalis-dev/apalis/pull/790))
963
- **fix(core)**: wake idle workers when monitor shutdown starts ([#777](https://github.com/apalis-dev/apalis/pull/777))
10-
- *bump*: to v1.0.0-rc.10 ([#775](https://github.com/apalis-dev/apalis/pull/775))
64+
- _bump_: to v1.0.0-rc.10 ([#775](https://github.com/apalis-dev/apalis/pull/775))
1165
- ci(deps): bump actions/cache from 4 to 6 ([#752](https://github.com/apalis-dev/apalis/pull/752))
1266
- **chore (api)!**: standardize execution context ([#751](https://github.com/apalis-dev/apalis/pull/751))
1367
- **chore**: bump opentelemetry_sdk ([#750](https://github.com/apalis-dev/apalis/pull/750))

‎Cargo.lock‎

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎apalis-core/Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "apalis-core"
3-
version = "1.0.0-rc.12"
3+
version = "1.0.0"
44
authors = ["Njuguna Mureithi <mureithinjuguna@gmail.com>"]
55
edition.workspace = true
66
repository.workspace = true
@@ -34,7 +34,7 @@ rand = { version = "0.10", features = ["std"] }
3434
futures-timer = { version = "3.0.4", optional = true }
3535
tracing = { version = "0.1.44", default-features = false, optional = true }
3636
ulid = { version = "3", optional = true, features = ["uuid"]}
37-
uuid = { version = "1.27.0", features = ["v4", "v5"], optional = true }
37+
uuid = { version = "1.28.0", features = ["v4", "v5"], optional = true }
3838
dashmap = { version = "6.2.1", default-features = false, optional = true}
3939

4040

‎apalis-core/README.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ Specific documentation for tasks can be found in the [`task`] and [`task::builde
4848

4949
##### Relevant Guides:
5050

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

5353
### Backends
5454

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

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

6969
#### Inbuilt Implementations
7070

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

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

7878
### Workers
7979

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

8282
#### Worker Lifecycle
8383

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

9999
#### Example: Building and Running a Worker
100100

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

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

134134
### Monitor
135135

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

138138
**Main Features:**
139139

@@ -166,7 +166,7 @@ async fn main() {
166166
}
167167
```
168168

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

171171
### Middleware
172172

0 commit comments

Comments
 (0)