-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from geofmureithi/chore/clippy_n_improvs
Chore/clippy n improvs
- Loading branch information
Showing
25 changed files
with
191 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "apalis" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Geoffrey Mureithi <[email protected]>"] | ||
description = "Simple, extensible multithreaded background job processing for Rust" | ||
repository = "https://github.com/geofmureithi/apalis" | ||
|
@@ -51,20 +51,20 @@ docsrs = ["document-features"] | |
|
||
|
||
[dependencies.apalis-redis] | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
optional = true | ||
default-features = false | ||
path = "./packages/apalis-redis" | ||
|
||
[dependencies.apalis-sql] | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
features = ["migrate"] | ||
optional = true | ||
default-features = false | ||
path = "./packages/apalis-sql" | ||
|
||
[dependencies.apalis-core] | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
optional = true | ||
default-features = false | ||
path = "./packages/apalis-core" | ||
|
@@ -84,7 +84,7 @@ all-features = true | |
criterion = { version = "0.3", features=["async_tokio"] } | ||
serde = "1" | ||
tokio = { version = "1", features =["macros"] } | ||
apalis-redis = { version = "0.3.0", path = "./packages/apalis-redis" } | ||
apalis-redis = { version = "0.3.1", path = "./packages/apalis-redis" } | ||
|
||
[[bench]] | ||
name = "redis_benchmark" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,22 +6,23 @@ use apalis::{ | |
use email_service::{send_email, Email}; | ||
|
||
async fn produce_jobs(storage: &PostgresStorage<Email>) { | ||
// The programatic way | ||
let mut storage = storage.clone(); | ||
for i in 0..10 { | ||
storage | ||
.push(Email { | ||
to: format!("test{}@example.com", i), | ||
text: "Test backround job from Apalis".to_string(), | ||
subject: "Background email job".to_string(), | ||
}) | ||
.await | ||
.unwrap(); | ||
} | ||
storage | ||
.push(Email { | ||
to: "[email protected]".to_string(), | ||
text: "Test backround job from Apalis".to_string(), | ||
subject: "Background email job".to_string(), | ||
}) | ||
.await | ||
.expect("Unable to push job"); | ||
// The sql way | ||
tracing::info!("You can also add jobs via sql query, run this: \n Select apalis.push_job('apalis::Email', json_build_object('subject', 'Test Apalis', 'to', '[email protected]', 'text', 'Lorem Ipsum'));") | ||
} | ||
|
||
struct TracingListener; | ||
impl WorkerListener for TracingListener { | ||
fn on_event(&self, worker_id: &String, event: &WorkerEvent) { | ||
fn on_event(&self, worker_id: &str, event: &WorkerEvent) { | ||
tracing::info!(worker_id = ?worker_id, event = ?event, "Received message from worker") | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
[package] | ||
name = "apalis-core" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Geoffrey Mureithi <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT" | ||
description = "Core for Apalis: simple, extensible multithreaded background processing for Rust" | ||
readme = "../../README.md" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
[package] | ||
name = "apalis-redis" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Geoffrey Mureithi <[email protected]>"] | ||
edition = "2018" | ||
readme = "../../README.md" | ||
|
||
license = "MIT" | ||
description = "Redis Storage for Apalis: simple and reliable background processing based on Actix Actors" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
apalis-core = { path = "../../packages/apalis-core", version = "0.3.0", default-features = false } | ||
apalis-core = { path = "../../packages/apalis-core", version = "0.3.1", default-features = false } | ||
redis = { version = "0.21" , features = ["tokio-comp"] } | ||
serde = "1" | ||
log = "0.4" | ||
|
Oops, something went wrong.