I am trying to use this async client and keep running into these errors
RuntimeError: Timeout context manager should be used inside a task
2022-11-16 00:49:21,368 ERROR asyncio Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x106ba64a0>
I have tried putting a close session after the refresh call, like so
but still get them. Would love if you could show me how to use this from an external package and maybe make it somehow more convenient for external users.
I have written some elementary "async" wrapper code on the regular DuneClient like:
(which could probably be pushed deeper into the _post and _get methods), but it works just fine without all this "close_session" stuff. Is there something wrong with this simplified approach?
cc @eliseygusev
I am trying to use this async client and keep running into these errors
I have tried putting a close session after the refresh call, like so
but still get them. Would love if you could show me how to use this from an external package and maybe make it somehow more convenient for external users.
I have written some elementary "async" wrapper code on the regular DuneClient like:
(which could probably be pushed deeper into the _post and _get methods), but it works just fine without all this "close_session" stuff. Is there something wrong with this simplified approach?
Originally posted by @bh2smith in https://github.com/cowprotocol/dune-client/issues/31#issuecomment-1316045313