simplified AioNotifier()

This commit is contained in:
Maxim Devaev
2022-08-07 19:04:32 +03:00
parent aa630988cc
commit ec9785b4be
18 changed files with 43 additions and 54 deletions

View File

@@ -96,7 +96,7 @@ class Snapshoter: # pylint: disable=too-many-instance-attributes
logger.info("Time to take the new idle snapshot")
try:
self.__snapshoting = True
await notifier.notify()
notifier.notify()
if not live:
await self.__wakeup()
@@ -116,7 +116,7 @@ class Snapshoter: # pylint: disable=too-many-instance-attributes
logger.exception("Unhandled exception while taking snapshot")
finally:
self.__snapshoting = False
await asyncio.shield(notifier.notify())
notifier.notify()
async def __wakeup(self) -> None:
logger = get_logger(0)