This repository was archived by the owner on Jul 4, 2025. It is now read-only.
fix: cortex stop child process #1841
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
Fixes Issues
Changes made
This pull request introduces several changes to enhance the functionality and robustness of the
ProcessManagerand related components in the engine. The most important changes include adding new service dependencies toProcessManager, handling model validation inPythonEngine, and improving the handling of file paths in utility functions.Enhancements to
ProcessManager:engine/controllers/process_manager.cc: Added logic to stop running models when thedestroymethod is called. This ensures that all models are properly stopped before the application quits.engine/controllers/process_manager.h: Added new dependencies (InferenceServiceandModelService) and a constructor to initialize these services. [1] [2]Model validation in
PythonEngine:engine/extensions/python-engine/python_engine.cc: Added checks inHandleInferenceandHandleRouteRequestmethods to validate if the specified model is loaded before proceeding. If the model is not loaded, an error response is returned. [1] [2]Improved file path handling:
engine/utils/curl_utils.cc: Modified theSimpleGetJsonRecursivefunction to usestd::filesystem::pathfor safer and more consistent file path handling.Other changes:
engine/main.cc: Updated the instantiation ofProcessManagerto include the new service dependencies.engine/services/model_service.cc: Simplified the setting of executable permissions by removing platform-specific code and using a unified approach.