Detect the rails zeus start complete

135 Views Asked by At

I have 2 terminals running, and I'd like to run

#on term1
zeus start
#on term2
zeus server

The problem is that normally it should wait for the start process to complete. My question is how could I make the second terminal to auto start the server after the zeus start complete?

I've tried sleep 2 ...but there should be better way. Thanks

1

There are 1 best solutions below

0
On

I am not sure there is something else than a hacky way for this. As stated in zeus's roadmap, starting the server whithout having to start zeus before is planned for version 2... If you want a hacky way, you can play with a little shell script like the following:

while [[ "`ps aux | grep "zeus slave" | wc -l`" == "1" ]]; do sleep 1; done; zeus server