Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait to wait for processes to stop #39

Closed
ralfthewise opened this issue Feb 28, 2014 · 6 comments
Closed

Wait to wait for processes to stop #39

ralfthewise opened this issue Feb 28, 2014 · 6 comments
Labels

Comments

@ralfthewise
Copy link

Couldn't find anything in the docs or a quick scour of the code. Ideally I would like something like:

bundle exec eye stop resque --wait

which wouldn't return until the signaled process(s) stopped. This is because ultimately I want to be able to do:

bundle exec eye stop all --wait
bundle exec eye quit

@kostya
Copy link
Owner

kostya commented Feb 28, 2014

Right now this is not possible. I am not a fan of wait at all, bluepill has some form of wait and mary bugs related with it. All commands is a signals to process, which scheduled in some queue.
Also, i not see many reasons for that, in my every day deploy i never needed wait, and even quit. If it was, i just do it manually. What the use case, if you need stop all and quit?

@kostya
Copy link
Owner

kostya commented Feb 28, 2014

about this https://github.com/kostya/eye/wiki/Run-ruby-apps-that-use-a-separate-bundle-than-eye-itself, i guess this is can be easier:

Eye.application :some do
   clear_bundler_env
   env "BUNDLE_GEMFILE" => "some_file"
end

@kostya kostya added the to_think label Mar 1, 2014
@ralfthewise
Copy link
Author

Ah, excellent, I hadn't seen that method in the DSL, will update the wiki. Thanks!

@ralfthewise
Copy link
Author

As for the wait issue, it's not a big deal so if you're strongly opposed to it I can certainly work around it. Our situation is such that we have a cluster of EC2 servers running resque jobs that grows and shrinks based on demand. Some of the resque jobs can be fairly long running (15-20 minutes), and when we want to shrink the cluster we have to make sure all resque jobs are finished on it before shutting the server down.

In general though it would be nice for some way to tell if all of the processes eye manages are stopped. Obviously we can just parse the output of "eye oinfo" or some such, and that's probably what we'll end up doing.

@kostya
Copy link
Owner

kostya commented May 12, 2014

in 0.6.rc added options to eye quit --stop_all and --timeout 600
eye q -s to stop all processes and quit.

@ralfthewise
Copy link
Author

Awesome, thanks @kostya will test this out next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants