Created
December 15, 2011 18:52
-
-
Save jefflab/1482307 to your computer and use it in GitHub Desktop.
task to wait for NFS propagation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :wait_for_current_symlink, :roles => :app do | |
run %Q[READY=0 ; until [ $READY -eq 1 ] ; do TARGET=`ls -l #{current_path} | sed 's/.*->\ //g'` ; RELEASE_PATH='#{release_path}' ; if [ $TARGET == $RELEASE_PATH ] ; then READY=1 ; fi; echo "waiting for NFS TARGET=$TARGET RELEASE_PATH=$RELEASE_PATH" ; sleep 2 ; done] | |
end | |
after "deploy:symlink", "wait_for_current_symlink" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment