fix shutdown and add reload

This commit is contained in:
2020-11-06 04:26:42 +01:00
parent b2e3d73dea
commit 5bc521da33
3 changed files with 81 additions and 32 deletions

View File

@@ -37,7 +37,10 @@ class _Task:
async def _start(self):
if self._delay > 0:
await asyncio.sleep(self._delay)
try:
await asyncio.sleep(self._delay)
except asyncio.CancelledError:
return
if self._callback is not None:
self._callback(self._event)