squash all exceptions when cancelling the task in SingleInstanceTask

otherwise restarting a failed task just raises the exception from the previous
failure
This commit is contained in:
Michael Hudson-Doyle 2019-12-12 23:01:51 +13:00
parent 4e1afd60a4
commit 992e131b5f
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class SingleInstanceTask:
self.task.cancel()
try:
await self.task
except asyncio.CancelledError:
except BaseException:
pass
self.task = schedule_task(self.func(*args, **kw))