Adding it as a daemon seems insufficient in the Lumi AS vm.
In this merge-request, I've added two modules:
- atexit: Python module, no dependency required
This module allows us to trigger an event when the process exits.
I've used this to modify the while True
of the daemon process to check this event. Whenever this event is set, it will stop the log process.
This event is set automatically when the main process ends for whatever reason.
- setproctitle: Dependency required
This module allows us to set a different name for each process spawn. This is visible for outside commands like ps ax
90004 pts/7 Ssl+ 0:02 /home/dbeltran/debug_pip/bin/python /home/dbeltran/PycharmProjects/autosubmit_2022a/bin/autosubmit -lc DEBUG -lf DEBUG run a053
90017 pts/7 Sl+ 0:00 autosubmit log a053 recovery marenostrum5