diff --git a/distributed/worker.py b/distributed/worker.py index 8164d93c44..50c3f177e5 100644 --- a/distributed/worker.py +++ b/distributed/worker.py @@ -2060,6 +2060,7 @@ def transition_waiting_ready(self, ts, *, stimulus_id): def transition_generic_error( self, ts, exception, traceback, exception_text, traceback_text, *, stimulus_id ): + self._executing.discard(ts) ts.exception = exception ts.traceback = traceback ts.exception_text = exception_text @@ -2073,7 +2074,6 @@ def transition_executing_error( ): for resource, quantity in ts.resource_restrictions.items(): self.available_resources[resource] += quantity - self._executing.discard(ts) return self.transition_generic_error( ts, exception,