Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to Multiplexer and Manager to terminate durable workers #2913

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
These changes are in response to PR comments.
  • Loading branch information
John Woolley committed Feb 14, 2024
commit 062adaafc46320cf7b475c631803be1979a7c2cd
2 changes: 1 addition & 1 deletion sanic/worker/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def terminate_durable_worker(self, ident: str) -> None:
worker = self.durable.get(ident)
if not worker:
error_logger.error(
f"Durable worker termination failed because {ident} not found."
"Durable worker termination failed (%s not found).", worker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be , ident; not , worker. That seems to be what's making the test fail.

)
return
for process in worker.processes:
Expand Down
2 changes: 1 addition & 1 deletion sanic/worker/multiplexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def terminate_worker(self, ident: str):
"""Terminate a worker.

Args:
name (str): The name of the worker to terminate.
ident (str): The name of the worker to terminate.
"""
self._monitor_publisher.send(f"__TERMINATE_WORKER__:{ident}")

Expand Down
Loading