Skip to content

Commit

Permalink
fix: try even harder to quit on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Oct 4, 2023
1 parent 7199532 commit 69dfe98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions horde_worker_regen/process_management/process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,10 @@ def _start_timed_shutdown(self) -> None:
def shutdown() -> None:
# Just in case the process manager gets stuck on shutdown
time.sleep((self.get_pending_megapixelsteps() * 1.75) + 3)

for process in self._process_map.values():
process.mp_process.join(0.01)

sys.exit(1)

threading.Thread(target=shutdown).start()

0 comments on commit 69dfe98

Please sign in to comment.