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

shutdown: terminate subprocesses #619

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions changes.d/619.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ensure that subprocesses created by Cylc UI Server are cleaned up correctly when the server shuts down.
9 changes: 8 additions & 1 deletion cylc/uiserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,17 @@
async def stop_extension(self):
# stop the async scan task
await self.workflows_mgr.stop()

Check warning on line 583 in cylc/uiserver/app.py

View check run for this annotation

Codecov / codecov/patch

cylc/uiserver/app.py#L583

Added line #L583 was not covered by tests
# stop active subscriptions
for sub in self.data_store_mgr.w_subs.values():
sub.stop()
# Shutdown the thread pool executor

# Shutdown the thread pool executor (used for subscription processing)

Check warning on line 588 in cylc/uiserver/app.py

View check run for this annotation

Codecov / codecov/patch

cylc/uiserver/app.py#L587-L588

Added lines #L587 - L588 were not covered by tests
self.data_store_mgr.executor.shutdown(wait=False)

Check warning on line 590 in cylc/uiserver/app.py

View check run for this annotation

Codecov / codecov/patch

cylc/uiserver/app.py#L590

Added line #L590 was not covered by tests
# stop the process pool (used for background commands)
self.executor.shutdown()

# Destroy ZeroMQ context of all sockets
self.workflows_mgr.context.destroy()
self.profiler.stop()
Loading