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()
|
self.task.cancel()
|
||||||
try:
|
try:
|
||||||
await self.task
|
await self.task
|
||||||
except asyncio.CancelledError:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
self.task = schedule_task(self.func(*args, **kw))
|
self.task = schedule_task(self.func(*args, **kw))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue