Open RickKessler opened 2 years ago
I believe there's a better way of doing this.
Ctrl-c
, however if the job dies unexpectedly, such as a terminal closing or ssh connection dying without Pippin being safely in a screen, this won't help. As such it would be good to have pippin place itself in a screen automatically, and close that screen once it's done.
Before re-launching pippin, one must remember to kill previous pippin job that may still be running in the background. In case we forget to kill previous pippin job, here is a suggestion for how to do this automatically. First, each pippin launch should write a launch time-stamp to a file in the PIPPIN_OUTPUT directory. Next, every time pippin wakes up to check status, it should verify that the time-stamp in the file hasn't changed. If there was another relaunch, the original pippin job will find a mis-matched time stamp and should quit ... perhaps leaving a PIPPIN.STOP file to inform the user.