Search code examples
rubyrakevlad-deployer

vlad tasks: after update, before symlink


We're using vlad the deployer to deploy our rails app.

Currently, we have some tasks that run after the vlad:update task. These tasks take a few minutes. During those few minutes, the site is broken.

I'd like to run those tasks in the middle of vlad:update -- after it has done everything except create the "current" symlink. How do I do that? the vlad:update task appears to be monolothic.


Solution

  • Found the answer. Define your task to run before the update_symlinks task rather than after the update task.

    remote_task :finish_deployment, :roles => :app do
      ...
    end
    
    remote_task :update_symlinks => :finish_deployment