Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

spikeninja
Copy link

  • add TaskiqAdminMiddleware to middlewares
  • add aiohttp package

@spikeninja spikeninja marked this pull request as draft June 29, 2025 09:53
@spikeninja spikeninja changed the title feat: add TaskiqAdminMiddleware, add aiohttp package feat: add TaskiqAdminMiddleware and aiohttp package Jun 29, 2025
@spikeninja spikeninja marked this pull request as ready for review July 20, 2025 12:56
@spikeninja spikeninja requested a review from s3rius July 20, 2025 12:56
Copy link
Member

@s3rius s3rius left a 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?

@@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants