1
我已經在我的deploy.rb
如下:Capistrano的部署跳過:遷移
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
是必需的,發行,獅身人面像會被重複啓動。什麼應該是適當的命令行?或者不妨將deploy:migrate
替換爲deploy:restart
?
after "deploy:update_code", "sphinx:stop"
after "deploy:restart", "sphinx:start"