capistrano/sshkit — pull request #168 by hobodave (2014-07-31 15:37:47+00:00)
Title: Remove unnecessary trailing wait

When executing sequential tasks with a wait interval, the existing behavior is to wait N seconds after each host, _including the last one_. My expectations of using a wait interval for sequential tasks is that the interval should be how long to wait _between each host_. After the last one I'd expect Capistrano to continue executing immediately.

This is especially problematic with "longer" wait intervals such as 30 seconds. Your deploy will just hang after you think it should be moving onto the rest of the deploy.

This patch simply pops the last host and runs it outside of the sleep loop.