Comments (17)
I will check the problem then close it.
from apalis.
Tried changing the order of layers, count from 3 -> 1. Did not work.
from apalis.
https://github.com/IgnisDa/ryot/blob/b9019dfa1f5948c071857a076ac7e14146d592d8/apps/backend/src/main.rs#L310-L322 are the lines if you are interested.
from apalis.
from apalis.
@geofmureithi I am not sure what I need to do with the methods you gave. I added them to my code, it didn't change the error.
from apalis.
Have you checked this issue?
#256
from apalis.
See also
tokio-rs/axum#987 (reply in thread)
The issue is that from 0.5 apalis needs the service to be clone yet tower rate limit is not clone.
The suggested option is to include BufferLayer infront of the rate limit one.
from apalis.
The suggested option is to include BufferLayer infront of the rate limit one.
I did that, still does not work. The error has changed:
from apalis.
Seems the issue here is with tower.
Can you try using .chain
Can you also try using a custom implementation eg https://medium.com/@khalludi123/creating-a-rate-limiter-middleware-using-tower-for-axum-rust-be1d65fbeca
from apalis.
Got it working with:
.register_with_count(
1,
WorkerBuilder::new("perform_application_job")
.data(importer_service_1.clone())
.data(exporter_service_1.clone())
.data(media_service_4.clone())
.data(exercise_service_1.clone())
.with_storage(perform_application_job_storage.clone())
.chain(|s| {
s.layer(BufferLayer::new(1024))
.layer(ApalisRateLimitLayer::new(
rate_limit_num,
Duration::new(5, 0),
))
.layer(ApalisTraceLayer::new())
})
.build_fn(perform_application_job),
)
Should I keep this issue open? (Since I had to use a workaround).
from apalis.
Cool! Thanks for your guidance.
from apalis.
@geofmureithi Any updates on this?
from apalis.
Related Issues (20)
- apalis-core tests not being run in CI
- Run one job at a time HOT 4
- docs.rs page is broken for latest version of apalis HOT 2
- Dependencies issue HOT 5
- Concurrency Limit apalis 0.5.0 HOT 3
- shutdown_timeout 0.5.0 HOT 4
- How to handle Generic Data HOT 8
- Use anyhow HOT 1
- Schedule on timestamp breaking on postgres on 0.5.1 HOT 3
- RetryLayer panic if retries set to 0 HOT 1
- Distributed scheduler via cron tasks? HOT 2
- Stop worker if already running and start the new one. HOT 1
- Using `deadpool_redis::Pool` with `apalis::redis::RedisStorage` HOT 3
- Examples outdated? HOT 1
- Adding a memory backed storage HOT 7
- Remove usage of `async-timer` HOT 6
- Workers spawns jobs without any limit HOT 1
- How to find when a cron job will run next? HOT 1
- Worker event - OutOfRangeError HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apalis.