Skip to content

Commit

Permalink
Raise only on plugin_add exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Jan 14, 2022
1 parent 560bb55 commit dc3aaeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1504,13 +1504,17 @@ async def start(self):

setproctitle("dask-worker [%s]" % self.address)

plugins_exceptions = await asyncio.gather(
plugins_msgs = await asyncio.gather(
*(
self.plugin_add(plugin=plugin, catch_errors=False)
for plugin in self._pending_plugins
),
return_exceptions=True,
)
plugins_exceptions = []
for msg in plugins_msgs:
if isinstance(msg, Exception):
plugins_exceptions.append(msg)
if len(plugins_exceptions) >= 1:
if len(plugins_exceptions) > 1:
logger.error(
Expand Down

0 comments on commit dc3aaeb

Please sign in to comment.