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:
parent
4e1afd60a4
commit
992e131b5f
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue