Run Python process as child process of NodeJS.#146
Run Python process as child process of NodeJS.#146joeriexelmans wants to merge 6 commits intoAToMPM:masterfrom
Conversation
|
Hi Joeri. Thanks for the PR. It's very much appreciated. Looking at the changes, and thinking through the implications of how AToMPM runs, I would prefer that this change be opt-in for now. That is, it is a child process only when the My primary reasoning is that there's a lot that can go wrong with the MT server in one particular case: The standalone version on Windows, which must be well-supported. Many difficulties can arise with Python not being installed correctly, or the required packages not being there. I would prefer that the user tackle these issues when they need to run the MT server, in their own terminal window for clarity. So I would be conservative and leave the status quo as is for now in most cases. But yes, for development on Linux, it would be nice to have a cleaner startup/shutdown. Therefore I would (kindly) ask for the following changes in this PR: Again, many thanks for this suggestion! |
|
Hi Bentley, |
Motivation
For the NodeJS process to "work", it depends on the Python process to also be running. The Python process has no dependencies. Therefore, it makes sense to launch the Python script as a child process of the NodeJS script.
To be more precise, the correct order (of a normal scenario) should be:
Startup:
Shutdown (graceful):
Features implemented
--without-child)I also deleted the bash script that starts both NodeJS & Python. I think it has become obsolete.
Limitations
Things to check
Resolves #145