I have the following in my deploy.rb
:
after "deploy:update_code", "sphinx:stop"
after "deploy:migrate", "sphinx:start"
Often when I issue a cap
command, sometimes the changes don't require a deploy:migrate
, and went to deploy:restart
as its final command. Hence, sphinx:start
was not issued and I had to restart Sphinx manually.
I could have done this:
after "deploy:update_code", "sphinx:stop"
after "deploy:migrate", "sphinx:start"
after "deploy:restart", "sphinx:start"
Bu开发者_如何学Got I don't wanna do this because if a deploy:migrate
is required and issued, Sphinx would be started twice. What should be the proper command line? Or might as well just replace deploy:migrate
with deploy:restart
?
after "deploy:update_code", "sphinx:stop"
after "deploy:restart", "sphinx:start"
after "deploy:update_code", "sphinx:stop"
after "deploy:restart", "sphinx:start"
This worked.
精彩评论