You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following is an idea to allow dependence of processes on unix commands: instead of the keyword "require" to list a number of immortal processes as dependencies one could introduce a keyword "require_cmd", which specifies a list of unix commands that are executed and have to return without errors (exit code 0) in order for the immortal process to start. Immortal would then automatically check this periodically, and as soon as these dynamic conditions are fulfilled, the process would be spawned.
Use case: spawn a process when a certain file exists/does not exist anymore.
Thank you!
The text was updated successfully, but these errors were encountered:
@luetge please check latest release 0.20.0 it has implemented this feature 👍
For testing in mac:
$ brew install immortal
create a supervisor dir:
mkdir /tmp/immortal
set the enviroment IMMORTAL_SDIR to that directory:
export IMMORTAL_SDIR=/tmp/immortal
add this environment in all terminals you use in case want to use immortaldir so that immortalctl can read/know where are the sockets for the processes
Create a dir to scan (in where your run.yml files will be):
mkdir $HOME/tmp/services
Start immortaldir on that directory:
immortaldir $HOME/tmp/services
Create a test run.yml file in $HOME/tmp/services, something like:
cmd: iostat 3log:
file: /tmp/iostat.logrequire_cmd: test -f /tmp/foo
It should not start until you create the file /tmp/foo, so you could test immortalctl should not print any process, later do touch /tmp/foo and it should start the process.
Hi,
the following is an idea to allow dependence of processes on unix commands: instead of the keyword "require" to list a number of immortal processes as dependencies one could introduce a keyword "require_cmd", which specifies a list of unix commands that are executed and have to return without errors (exit code 0) in order for the immortal process to start. Immortal would then automatically check this periodically, and as soon as these dynamic conditions are fulfilled, the process would be spawned.
Use case: spawn a process when a certain file exists/does not exist anymore.
Thank you!
The text was updated successfully, but these errors were encountered: