kostya / eye

Process monitoring tool. Inspired from Bluepill and God.
MIT License
1.19k stars 89 forks source link

Synchronous/blocking restart #205

Open derSascha opened 6 years ago

derSascha commented 6 years ago

Hi, is there an easy way to run the restart command in blocking mode? Issue #93 sounds like this, but is very old and ends up in some non English language.

It would be very helpful while running eye in some deploy script (e.g. capistrano) that runs additional stuff after the process has been really restarted.

My current workaround looks like this:

Eye.app...
    trigger :transition, from: :restarting, to: :up, do: -> {
        process.execute_sync "rm -f tmp/restarting-abc-proc"
        info "got to up (#{process.name})"
    }

And in the deploy script

touch tmp/restarting-abc-proc
eye restart abc-proc
while test -f tmp/restarting-abc-proc; do sleep 1; done

Any suggestions?

kostya commented 6 years ago

yes, right now it works only as you describe. i tried to do sync command in branch, but not finished...

derSascha commented 6 years ago

do you need some help on this? which branch do you mean?

kostya commented 6 years ago

no, it just not easy in current code.