Capistrano 跳过部署:迁移
我的 deploy.rb
中有以下内容:
after "deploy:update_code", "sphinx:stop"
after "deploy:migrate", "sphinx:start"
通常,当我发出 cap
命令时,有时更改不需要 deploy:migrate
,并转到 deploy:restart
作为其最终命令。因此,sphinx:start
未发出,我必须手动重新启动 Sphinx。
我本可以这样做:
after "deploy:update_code", "sphinx:stop"
after "deploy:migrate", "sphinx:start"
after "deploy:restart", "sphinx:start"
但我不想这样做,因为如果需要并发出 deploy:migrate
,Sphinx 将启动两次。正确的命令行应该是什么?或者也可以将 deploy:migrate
替换为 deploy:restart
?
after "deploy:update_code", "sphinx:stop"
after "deploy:restart", "sphinx:start"
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"
But 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"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这奏效了。
This worked.