-
Notifications
You must be signed in to change notification settings - Fork 154
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
No way to release pool connection when using decorator and aiohttp #352
Comments
Hi @kivsiak, yup its a known issue. There is manual way of doing this if you really need it. Any function that you decorate will have an attribute called |
Hello @argaen, looks like i'm bad at decoration, usualy i use this way to add attrs: https://gist.github.com/kivsiak/9a2b5965ee3fd40c8c4b072e160a63cf Here the gist of my way of using https://gist.github.com/kivsiak/b2fc47008f1cdc01bd4d08359ccfc2d8 cached_call after decoration have no _cache, cache, close() attributes. |
You are right, with the current implementation the cache is not accessible through the decorated function. By adding a Do you want to provide MR for this? (should include tests + docs updated). |
Next release this will be avaible as |
When i use
@cache
decorator in my aiohttp application and close app using ctrl-C i got this message in output:Not critical, but dirty. Is there any way to clear close all connection and courtines? In aiohttp cleanup handler?
The text was updated successfully, but these errors were encountered: