Skip to content

Commit

Permalink
Sync state tolerance (#2725)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed Mar 26, 2023
1 parent 6e1c787 commit a8c2d77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sanic/worker/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ def _all_workers_ack(self):

def _sync_states(self):
for process in self.processes:
state = self.worker_state[process.name].get("state")
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)

0 comments on commit a8c2d77

Please sign in to comment.