-
-
Notifications
You must be signed in to change notification settings - Fork 89
feat: add TaskiqAdminMiddleware and aiohttp package #478
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
base: master
Are you sure you want to change the base?
Conversation
spikeninja
commented
Jun 29, 2025
- add TaskiqAdminMiddleware to middlewares
- add aiohttp package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this will work as you intended.
I think it would be better to make all method implementations asynchronous to ensure that the loop is running. While we are pretty much confident that it should execute correctly, it might be somewhat controversial for users who want to test this middleware or use it manually for some reason.
Since TaskiqMiddleware
allows you to define both synchronous and asynchronous methods, you can achieve this by simply adding the async
keyword right before the def
.
What do you think? Does this make sense to you?
pyproject.toml
Outdated
@@ -50,6 +50,7 @@ orjson = { version = "^3", optional = true } | |||
msgpack = { version = "^1.0.7", optional = true } | |||
cbor2 = { version = "^5", optional = true } | |||
izulu = "0.50.0" | |||
aiohttp = "^3.12.13" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiohttp = "^3.12.13" | |
aiohttp = "^3" |
Let's unpin this version, to have less strict dependency requirements.
Current one basically translates to >=3.12.13,<3.13.0
. The new one makes it more flexible >=3.0.0,<4.0.0
. It will be easier to integrate in existing projects that use aiohttp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done