@@ -315,6 +315,7 @@ class Daemon(Logger):
|
|||||||
try:
|
try:
|
||||||
async with self.taskgroup as group:
|
async with self.taskgroup as group:
|
||||||
[await group.spawn(job) for job in jobs]
|
[await group.spawn(job) for job in jobs]
|
||||||
|
await group.spawn(asyncio.Event().wait) # run forever (until cancel)
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
self.logger.exception('daemon.taskgroup died.')
|
self.logger.exception('daemon.taskgroup died.')
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user