-
-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Is your feature request related to a problem? Please describe.
We can open a client, but we cannot close the session. We have to work around it providing our own context manager which accesses a private variable in PrometheusConnect
:
def __enter__(self):
return self._prometheus
def __exit__(self, exc_type, exc_val, exc_tb):
if self._prometheus._session:
self._prometheus._session.close()
return False
Describe the solution you'd like
Would be nice to have a close method, or even also implement context manager.
Describe alternatives you've considered
Not sure if there are any. We need to be able to not leak connections.
Metadata
Metadata
Assignees
Labels
No labels