-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The TaskiqAdminMiddleware
significantly slows down task triggering (.kiq()
) because it blocks execution waiting for HTTP requests to complete. Each task operation creates a new HTTP client httpx.AsyncClient()
instead of reusing one, adding unnecessary overhead.
The middleware should:
- Avoid blocking task operations while reporting status
- Reuse HTTP connections where possible
httpx.AsyncClient()
- Handle reporting asynchronously without impacting task throughput
This becomes particularly noticeable when triggering many tasks rapidly (e.g., in loops or batch operations). The current implementation forces sequential HTTP requests, making bulk task triggering much slower than expected.
I believe the problem is clear, but I'm happy to provide code examples or additional details if needed.
Metadata
Metadata
Assignees
Labels
No labels