mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-03 03:21:54 +08:00
simplified AioNotifier()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user