Skip to content

Commit e8fa915

Browse files
committed
feature: added management api for redis
1 parent dd2e1f1 commit e8fa915

File tree

15 files changed

+385
-372
lines changed

15 files changed

+385
-372
lines changed

.vscode/settings.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
2-
"rust-analyzer.showUnlinkedFileNotification": false,
3-
"rust-analyzer.cargo.features": [
4-
"redis",
5-
"rabbitmq",
6-
"test-fairness",
7-
"management"
8-
]
2+
"rust-analyzer.showUnlinkedFileNotification": true,
3+
"rust-analyzer.cargo.features": "all"
94
}

Cargo.lock

+157-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

broccoli-queue/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ redis = { version = "0.27.5", features = [
3232
"aio",
3333
], optional = true }
3434
dashmap = "6.1.0"
35+
derive_more = { version = "2.0.1", features = ["display"], optional = true }
3536

3637
[dev-dependencies]
3738
chrono = { version = "0.4.39", features = ["serde"] }
@@ -52,7 +53,7 @@ rabbitmq = ["dep:lapin", "dep:deadpool", "dep:deadpool-lapin"]
5253
test-fairness = []
5354

5455
# Allows for access to the management API for the queue.
55-
management = []
56+
management = ["dep:derive_more"]
5657

5758
[[bench]]
5859
name = "queue_benchmark"

broccoli-queue/examples/consumer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async fn process_job(job: JobPayload) -> Result<(), BroccoliError> {
2323
// Simulate some work
2424
tokio::time::sleep(Duration::from_secs(1)).await;
2525

26-
Ok(())
26+
Err(BroccoliError::Consume("Failed to process job".into()))
2727
}
2828

2929
async fn success_handler(msg: JobPayload) -> Result<(), BroccoliError> {

0 commit comments

Comments
 (0)