Skip to content

Commit

Permalink
Minor updates on cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
geofmureithi committed Apr 9, 2023
1 parent 1a5fb1b commit e0c5307
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ filter = ["apalis-core/filter"]
## Add a global extensions to jobs
extensions =["apalis-core/extensions"]
## Compatibility with async-std and smol runtimes
async-std-comp = ["apalis-sql/async-std-comp", "apalis-redis/async-std-comp" ]
async-std-comp = ["apalis-core/async-std-comp", "apalis-sql/async-std-comp", "apalis-redis/async-std-comp", "apalis-cron/async-std-comp", ]
## Compatibility with tokio and actix runtimes
tokio-comp = ["apalis-core/tokio-comp", "apalis-sql/tokio-comp", "apalis-redis/tokio-comp" ]
tokio-comp = ["apalis-core/tokio-comp", "apalis-sql/tokio-comp", "apalis-redis/tokio-comp", "apalis-cron/tokio-comp" ]

## Expose job sources for web and cli purposes
expose = ["apalis-core/expose", "apalis-sql/expose", "apalis-redis/expose"]
Expand All @@ -55,6 +55,7 @@ docsrs = ["document-features"]
version = "0.4.0-alpha.5"
optional = true
path = "./packages/apalis-redis"
default-features = false

[dependencies.apalis-sql]
version = "0.4.0-alpha.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/apalis-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ uuid = { version = "0.8", optional = true }
async-stream = "0.3"

[features]
default = ["storage"]
default = ["storage", "tokio-comp"]
storage = []
expose = []
layers = ["sentry", "prometheus", "trace", "retry", "timeout", "limit", "filter", "extensions"]
Expand Down
2 changes: 2 additions & 0 deletions packages/apalis-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub enum JobError {
#[error("Job Failed: {0}")]
Failed(#[source] BoxDynError),

#[cfg(feature = "storage")]
#[cfg_attr(docsrs, doc(cfg(feature = "storage")))]
/// An error communicating with storage.
#[error("Error communicating with storage: {0}")]
Storage(#[from] StorageError),
Expand Down
10 changes: 8 additions & 2 deletions packages/apalis-cron/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ description = "A simple yet extensible library for cron-like job scheduling for
# 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.4.0-alpha.5" }
apalis-core = { path = "../../packages/apalis-core", version = "0.4.0-alpha.5", default-features = false }
cron = "0.11.0"
futures = "0.3"
tower = { version = "0.4" }
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
tokio = { version = "1", features = ["time"] }
tokio = { version = "1", features = ["time"], optional = true }
async-stream = "0.3.3"
async-std = { version = "1.8.0", optional = true}

[dev-dependencies]
tokio = { version = "1", features = ["macros"] }
apalis-core = { path = "../../packages/apalis-core", version = "0.4.0-alpha.5", features=["extensions", "retry"] }
serde = { version = "1.0", features = ["derive"] }

[features]
default = ["tokio-comp"]
async-std-comp = ["async-std", "apalis-core/async-std-comp" ]
tokio-comp = ["tokio", "tokio/net", "apalis-core/tokio-comp" ]

[package.metadata.docs.rs]
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]
Expand Down
2 changes: 1 addition & 1 deletion packages/apalis-redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tokio = { version = "1", features = ["macros"] }
email-service = { path = "../../examples/email-service" }

[features]
default = []
default = ["tokio-comp"]
async-std-comp = ["async-std", "redis/async-std-comp", "apalis-core/async-std-comp" ]
tokio-comp = ["tokio", "tokio/net", "redis/tokio-comp", "apalis-core/tokio-comp" ]
expose = ["apalis-core/expose"]
2 changes: 1 addition & 1 deletion packages/apalis-sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
description = "SQL Storage for apalis: simple, extensible multithreaded background job processing for Rust"

[features]
default = [ "sqlite", "migrate"]
default = [ "sqlite", "migrate", "tokio-comp"]
postgres = [ "sqlx/postgres", "sqlx/json", "sqlx/chrono"]
sqlite = [ "sqlx/sqlite", "sqlx/json", "sqlx/chrono"]
mysql = [ "sqlx/mysql", "sqlx/json", "sqlx/chrono", "sqlx/bigdecimal"]
Expand Down

0 comments on commit e0c5307

Please sign in to comment.