Skip to content

Commit 80c75d9

Browse files
committed
sq-poller: raise unhandled tasks exceptions
Signed-off-by: Claudio Lorina <[email protected]>
1 parent a76c76b commit 80c75d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

suzieq/poller/worker/worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ async def run(self):
138138
tasks = await self._pop_waiting_worker_tasks()
139139
while tasks:
140140
try:
141-
_, pending = await asyncio.wait(
141+
done, pending = await asyncio.wait(
142142
tasks, return_when=asyncio.FIRST_COMPLETED)
143+
for d in done:
144+
if d.exception():
145+
raise d.exception()
143146
tasks = list(pending)
144147
running_svcs = self.service_manager.running_services
145148
if tasks and any(i._coro in running_svcs

0 commit comments

Comments
 (0)