我是Enginyard的新手。我使用enginyard Web界面部署了应用程序,但使用“ey rollback”命令从控制台回滚。
我的问题是这个命令是否也回滚了迁移?
答案 0 :(得分:0)
从engineyard-serverside API判断,它不会回滚迁移。考虑到可能的不可预测性,这是有道理的。作为参考,执行迁移的实际代码是:
# task
def rollback
if c.all_releases.size > 1
rolled_back_release = c.latest_release
c.release_path = c.previous_release(rolled_back_release)
revision = File.read(File.join(c.release_path, 'REVISION')).strip
info "~> Rolling back to previous release: #{short_log_message(revision)}"
run_with_callbacks(:symlink)
sudo "rm -rf #{rolled_back_release}"
bundle
info "~> Restarting with previous release"
with_maintenance_page { run_with_callbacks(:restart) }
else
info "~> Already at oldest release, nothing to roll back to"
exit(1)
end
end
您可以相当轻松地解析它,意味着它重新为项目执行符号链接,删除最新(失败)部署,并重新启动Web服务器。