shielded some tasks

This commit is contained in:
Maxim Devaev
2022-08-05 18:19:31 +03:00
parent eeaeebf7c7
commit d21e74700a
8 changed files with 30 additions and 20 deletions

View File

@@ -66,7 +66,7 @@ class ExtrasInfoSubmanager(BaseInfoSubmanager):
return None
finally:
if sui is not None:
await sui.close()
await asyncio.shield(sui.close())
def __get_extras_path(self, *parts: str) -> str:
return os.path.join(self.__global_config.kvmd.info.extras, *parts)

View File

@@ -116,7 +116,7 @@ class Snapshoter: # pylint: disable=too-many-instance-attributes
logger.exception("Unhandled exception while taking snapshot")
finally:
self.__snapshoting = False
await notifier.notify()
await asyncio.shield(notifier.notify())
async def __wakeup(self) -> None:
logger = get_logger(0)