[英]Capistrano skips deploy:migrate
I have the following in my deploy.rb
: 我的deploy.rb
有以下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. 通常,当我发出cap
命令时,有时所做的更改不需要deploy:migrate
,而是deploy:migrate
deploy:restart
作为其最终命令。 Hence, sphinx:start
was not issued and I had to restart Sphinx manually. 因此,没有发出sphinx:start
,我不得不手动重新启动Sphinx。
I could have done this: 我可以这样做:
after "deploy:update_code", "sphinx:stop"
after "deploy:migrate", "sphinx:start"
after "deploy:restart", "sphinx:start"
But I don't wanna do this because if a deploy:migrate
is required and issued, Sphinx would be started twice. 但是我不想这样做,因为如果需要并发布deploy:migrate
,则Sphinx将启动两次。 What should be the proper command line? 正确的命令行应该是什么? Or might as well just replace deploy:migrate
with deploy:restart
? 或者也可以将deploy:migrate
替换为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. 这工作了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.