add missing await
This commit is contained in:
parent
7fd57034dc
commit
6b8a2f64f8
3 changed files with 1 additions and 13 deletions
|
@ -21,12 +21,6 @@ class AlertmanagerClient:
|
||||||
self.cache = cache
|
self.cache = cache
|
||||||
self.session = aiohttp.ClientSession()
|
self.session = aiohttp.ClientSession()
|
||||||
|
|
||||||
async def __aenter__(self) -> AlertmanagerClient:
|
|
||||||
return self
|
|
||||||
|
|
||||||
async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
|
|
||||||
await self.close()
|
|
||||||
|
|
||||||
async def close(self) -> None:
|
async def close(self) -> None:
|
||||||
await self.session.close()
|
await self.session.close()
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ async def start_matrix_client(
|
||||||
# Sleep so we don't bombard the server with login requests
|
# Sleep so we don't bombard the server with login requests
|
||||||
await asyncio.sleep(15)
|
await asyncio.sleep(15)
|
||||||
finally:
|
finally:
|
||||||
client.close()
|
await client.close()
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|
|
@ -64,12 +64,6 @@ class Webhook:
|
||||||
self.port = config.port
|
self.port = config.port
|
||||||
self.socket = config.socket
|
self.socket = config.socket
|
||||||
|
|
||||||
async def __aenter__(self) -> Webhook:
|
|
||||||
return self
|
|
||||||
|
|
||||||
async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
|
|
||||||
await self.close()
|
|
||||||
|
|
||||||
async def start(self) -> None:
|
async def start(self) -> None:
|
||||||
await self.runner.setup()
|
await self.runner.setup()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue