Discard dependent rather than remove
There are some cases where Worker dependencies and dependents can get out of
sync, especially when we lose dependencies but the dependents are still around.
To reflect this we replace a set.remove with set.discard
Fixes
@@ -2121,7 +2121,7 @@ class Worker(WorkerBase):
for dep in self.dependencies.pop(key, ()):
if dep in self.dependents:
- self.dependents[dep].remove(key)
+ self.dependents[dep].discard(key)
if not self.dependents[dep] and self.dep_state[dep] in ('waiting', 'flight'):
self.release_dep(dep)
