Sync state tolerance (#2725)

This commit is contained in:
Adam Hopkins 2023-03-26 08:39:59 +03:00 committed by GitHub
parent 6e1c787e5d
commit a8c2d77c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,6 +312,10 @@ class WorkerManager:
def _sync_states(self):
for process in self.processes:
try:
state = self.worker_state[process.name].get("state")
except KeyError:
process.set_state(ProcessState.TERMINATED, True)
continue
if state and process.state.name != state:
process.set_state(ProcessState[state], True)