Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing v0.5! #234

Merged
merged 34 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
72784e2
Introducing v0.5!
geofmureithi Jan 19, 2024
4b15e8b
fix: api and other fixes
geofmureithi Jan 26, 2024
2c96f65
Fix: improvements on backends
geofmureithi Feb 2, 2024
97d32a5
fix: improve api
geofmureithi Feb 7, 2024
944886e
fix: remove utils and simplify crates
geofmureithi Feb 7, 2024
9e0c5b5
lint: fmt issues
geofmureithi Feb 7, 2024
0408c59
lint: clippy fixes
geofmureithi Feb 7, 2024
73ef92e
fix: moved files
geofmureithi Feb 7, 2024
3671b0c
clippy: fixes
geofmureithi Feb 7, 2024
07da53f
tests: updates on tests
geofmureithi Feb 8, 2024
6dbde0b
fixes: on internal api
geofmureithi Feb 8, 2024
0d7e0a9
ci: update the test features
geofmureithi Feb 9, 2024
c16bfe0
test: remove some assertions
geofmureithi Feb 9, 2024
12f5d0b
docs: updated docs for tests
geofmureithi Feb 9, 2024
bbfb916
Merge branch 'master' into v0.5-dev
geofmureithi Feb 9, 2024
9b3eddf
fix: minor clippy and fixes
geofmureithi Feb 9, 2024
4e063a0
bench: fixes on bench:
geofmureithi Feb 9, 2024
576f6b4
bench: fixes on bench:
geofmureithi Feb 9, 2024
305b0c2
bench: !
geofmureithi Feb 9, 2024
5a63eba
bench: !
geofmureithi Feb 9, 2024
7ed8e9c
fix: version for test
geofmureithi Feb 9, 2024
49d1a3b
fix: add vacuuming and other apis
geofmureithi Feb 21, 2024
c0138f1
fix: improve benches
geofmureithi Feb 21, 2024
6386ae4
fix: benches and worker
geofmureithi Feb 21, 2024
8d237ab
fix: typo
geofmureithi Feb 21, 2024
438b554
fix: prepared statement
geofmureithi Feb 22, 2024
752369e
lint: clippy
geofmureithi Feb 22, 2024
5331a62
fix: redis test
geofmureithi Feb 22, 2024
54b1fa2
add: use ulid without jid
geofmureithi Feb 25, 2024
9ace2fd
add: improve the Readme.md
geofmureithi Feb 25, 2024
92b84d1
Merge branch 'master' into v0.5-dev
geofmureithi Feb 25, 2024
dec1625
fix: tower link
geofmureithi Feb 25, 2024
11aedfb
Merge branch 'v0.5-dev' of github.com:geofmureithi/apalis into v0.5-dev
geofmureithi Feb 25, 2024
88b2ad4
bump: to 0.5
geofmureithi Feb 25, 2024
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
7 changes: 1 addition & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: check
args: --features async-std-comp,chrono --no-default-features
- uses: actions-rs/cargo@v1
with:
command: check
args: --features async-std-comp,time --no-default-features

args: --features async-std-comp --no-default-features

test:
name: Test Suite
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

name: Mysql CI

jobs:
jobs:
test-mysql:
name: Test Suite with MySQL
runs-on: ubuntu-latest
Expand All @@ -31,15 +31,13 @@ jobs:
ports:
- 3306:3306
env:
DATABASE_URL: mysql://test:test@localhost/test
DATABASE_URL: mysql://test:test@localhost/test
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo test --no-default-features --features mysql,migrate,tokio-comp,chrono -- --test-threads=1
- run: cargo test --no-default-features --features mysql,migrate,tokio-comp -- --test-threads=1
working-directory: packages/apalis-sql
- run: cargo test --no-default-features --features mysql,migrate,tokio-comp,time -- --test-threads=1
working-directory: packages/apalis-sql
4 changes: 1 addition & 3 deletions .github/workflows/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ jobs:
profile: minimal
toolchain: stable
override: true
- run: cargo test --no-default-features --features postgres,migrate,tokio-comp,chrono -- --test-threads=1
working-directory: packages/apalis-sql
- run: cargo test --no-default-features --features postgres,migrate,tokio-comp,time -- --test-threads=1
- run: cargo test --no-default-features --features postgres,migrate,tokio-comp -- --test-threads=1
working-directory: packages/apalis-sql
16 changes: 4 additions & 12 deletions .github/workflows/redis.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
push:
paths:
- 'packages/apalis-redis/**'
- '.github/workflows/redis.yaml'
- "packages/apalis-redis/**"
- ".github/workflows/redis.yaml"
pull_request:
paths:
- 'packages/apalis-redis/**'
- '.github/workflows/redis.yaml'
- "packages/apalis-redis/**"
- ".github/workflows/redis.yaml"

name: Redis CI

Expand Down Expand Up @@ -34,11 +34,3 @@ jobs:
working-directory: packages/apalis-redis
env:
REDIS_URL: redis://127.0.0.1/
- run: cargo test --features tokio-comp,time --no-default-features -- --test-threads=1
working-directory: packages/apalis-redis
env:
REDIS_URL: redis://127.0.0.1/
- run: cargo test --features async-std-comp,time --no-default-features -- --test-threads=1
working-directory: packages/apalis-redis
env:
REDIS_URL: redis://127.0.0.1/
4 changes: 1 addition & 3 deletions .github/workflows/sqlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ jobs:
profile: minimal
toolchain: stable
override: true
- run: cargo test --no-default-features --features sqlite,migrate,tokio-comp,chrono -- --test-threads=1
working-directory: packages/apalis-sql
- run: cargo test --no-default-features --features sqlite,migrate,tokio-comp,time -- --test-threads=1
- run: cargo test --no-default-features --features sqlite,migrate,tokio-comp -- --test-threads=1
working-directory: packages/apalis-sql
111 changes: 63 additions & 48 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apalis"
version = "0.4.9"
version = "0.5.0"
authors = ["Geoffrey Mureithi <mureithinjuguna@gmail.com>"]
description = "Simple, extensible multithreaded background job processing for Rust"
repository = "https://github.com/geofmureithi/apalis"
Expand All @@ -15,9 +15,7 @@ edition = "2021"
bench = false

[features]
default = ["tracing", "tokio-comp", "chrono"]
## Support Tracing 👀
tracing = ["apalis-core/trace"]
default = ["tracing", "tokio-comp"]

## Include redis storage
redis = ["apalis-redis"]
Expand All @@ -30,67 +28,67 @@ mysql = ["apalis-sql/mysql"]
## Include Cron functionality
cron = ["apalis-cron"]

## Use chrono library for time representation
chrono = ["apalis-core/chrono", "apalis-sql?/chrono", "apalis-redis?/chrono"]
## Use time library for time representation
time = ["apalis-core/time", "apalis-sql?/time", "apalis-redis?/time"]
## Support Tracing 👀
tracing = ["dep:tracing", "dep:tracing-futures"]

## Support for Sentry exception and performance monitoring
sentry = ["apalis-core/sentry"]
sentry = ["sentry-core", "ulid?/uuid", "uuid"]
## Support Prometheus metrics
prometheus = ["apalis-core/prometheus"]
prometheus = ["metrics", "metrics-exporter-prometheus"]
## Support direct retrying jobs
retry = ["apalis-core/retry"]
retry = ["tower/retry"]
## Support timeouts on jobs
timeout = ["apalis-core/timeout"]
timeout = ["tower/timeout"]
## 💪 Limit the amount of jobs
limit = ["apalis-core/limit"]
limit = ["tower/limit"]
## Support filtering jobs based on a predicate
filter = ["apalis-core/filter"]
## Add a global extensions to jobs
extensions = ["apalis-core/extensions"]
filter = ["tower/filter"]
## Compatibility with async-std and smol runtimes
async-std-comp = [
"apalis-core/async-std-comp",
"apalis-sql?/async-std-comp",
"apalis-redis?/async-std-comp",
"apalis-cron?/async-std-comp",
"async-std",
]
## Compatibility with tokio and actix runtimes
tokio-comp = [
"apalis-core/tokio-comp",
"apalis-sql?/tokio-comp",
"apalis-redis?/tokio-comp",
"apalis-cron?/tokio-comp",
"tokio",
]

## Expose job sources for web and cli purposes
expose = ["apalis-core/expose", "apalis-sql?/expose", "apalis-redis?/expose"]

docsrs = ["document-features"]

layers = [
"sentry",
"prometheus",
"tracing",
"retry",
"timeout",
"limit",
"filter",
]

[dependencies.apalis-redis]
version = "0.4.9"
version = "0.5.0"
optional = true
path = "./packages/apalis-redis"
default-features = false

[dependencies.apalis-sql]
version = "0.4.9"

version = "0.5.0"
features = ["migrate"]
optional = true
default-features = false
path = "./packages/apalis-sql"

[dependencies.apalis-core]
version = "0.4.9"
version = "0.5.0"
default-features = false
path = "./packages/apalis-core"
features = ["storage"]

[dependencies.apalis-cron]
version = "0.4.9"
version = "0.5.0"
optional = true
default-features = false
path = "./packages/apalis-cron"
Expand All @@ -103,22 +101,7 @@ optional = true
[package.metadata.docs.rs]
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]
features = [
"redis",
"sqlite",
"postgres",
"cron",
"sentry",
"prometheus",
"retry",
"timeout",
"limit",
"filter",
"extensions",
"tokio-comp",
"expose",
"docsrs",
]
all-features = true


[dev-dependencies]
Expand All @@ -127,11 +110,19 @@ pprof = { version = "0.13", features = ["flamegraph"] }
paste = "1.0.14"
serde = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
apalis-redis = { version = "0.4.9", path = "./packages/apalis-redis" }
apalis-sql = { version = "0.4.9", path = "./packages/apalis-sql", features = [
"sqlite", "postgres", "mysql"
apalis = { path = ".", features = ["redis", "sqlite", "postgres", "mysql"] }
redis = { version = "0.24", default-features = false, features = [
"script",
"aio",
"connection-manager",
] }

[dev-dependencies.sqlx]
version = "0.7.3"
default-features = false
features = ["chrono", "mysql", "sqlite", "postgres"]


[[bench]]
name = "storages"
harness = false
Expand All @@ -153,7 +144,31 @@ members = [
"examples/axum",
"examples/prometheus",
"examples/tracing",
"examples/rest-api",
# "examples/rest-api",
"examples/async-std-runtime",
"examples/basics",
]


[dependencies]
tokio = { version = "1", features = [
"rt",
], default-features = false, optional = true }
async-std = { version = "1", optional = true }
tower = { version = "0.4", features = ["util"], default-features = false }
tracing-futures = { version = "0.2.5", optional = true, default-features = false }
sentry-core = { version = "0.32.1", optional = true, default-features = false }
metrics = { version = "0.22", optional = true, default-features = false }
metrics-exporter-prometheus = { version = "0.13", optional = true, default-features = false }
thiserror = "1"
futures = "0.3"
pin-project-lite = "0.2.13"
# Needed only for sentry reporting
uuid = { version = "1.6", optional = true }
ulid = { version = "1", optional = true }
serde = { version = "1.0", features = ["derive"] }

[dependencies.tracing]
default_features = false
version = "0.1"
optional = true
Loading
Loading