Skip to content

Commit

Permalink
fix: zombie detection shutdown in more situations
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Mar 6, 2024
1 parent db0c626 commit e211bcb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion horde_worker_regen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

ASSETS_FOLDER_PATH = Path(__file__).parent / "assets"

__version__ = "4.2.6"
__version__ = "4.2.7"
4 changes: 3 additions & 1 deletion horde_worker_regen/process_management/process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2993,7 +2993,7 @@ def shutdown() -> None:
process.mp_process.kill()
process.mp_process.kill()

process.mp_process.join()
process.mp_process.join(1)

sys.exit(1)

Expand Down Expand Up @@ -3030,6 +3030,7 @@ def replace_hung_processes(self) -> bool:
self._shutting_down = True

self.job_deque.clear()
self.jobs_being_safety_checked.clear()
self.jobs_pending_safety_check.clear()
self.jobs_lookup.clear()
self.jobs_in_progress.clear()
Expand All @@ -3043,6 +3044,7 @@ def replace_hung_processes(self) -> bool:
process_info.mp_process.join(1)

logger.error("Exiting due to exit_on_unhandled_faults being enabled")
self._process_map.clear()
return True

logger.error("All processes have been unresponsive for too long, attempting to recover.")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "horde_worker_regen"
version = "4.2.6"
version = "4.2.7"
description = "Allows you to connect to the AI Horde and generate images for users."
authors = [
{name = "tazlin", email = "[email protected]"},
Expand Down

0 comments on commit e211bcb

Please sign in to comment.