-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
Description
Lower priority but would be nice to fix ev_pickup
events when a gateway is down and messages are rerouted in tree mode.
See test test_tree_run_abort_on_start
in TreeWorkerTest.py
where the check for ev_pickup
is currently disabled.
The problem is in Worker/Tree.py
:
def _check_ini(self):
self.logger.debug("TreeWorker: _check_ini (%d, %d)", self._start_count,
self._child_count)
if self.eh is not None and self._start_count >= self._child_count:
# this part is called once
self.eh.ev_start(self)
# Blindly generate pickup events: this could maybe be improved, for
# example, generated only when commands are sent to the gateways
# or for direct targets, using MetaWorkerEventHandler.
for node in self.nodes:
_eh_sigspec_invoke_compat(self.eh.ev_pickup, 2, self, node)
In addition the the problems highlighted by the inline comment, the call to ev_start()
just before might have aborted the worker, and so ideally ev_pickup
should not be generated in that case.