dmacdougall/fezzik — Issue #25: Add a facility for running multiple over one ssh session
Author: philc
Created: 2012-03-07 01:59:13+00:00
State: open

I'm not sure what form this takes, but if you provide a mechanism baked into fezzik and guide people to use it in the README, their deploys will become faster.

You'll recall that we use this in Helios to get the job done.

# Runs all of the given commands as one big string. Each separate SSH command you run is 1s of overhead,
# so this will be much faster if one of your tasks issues many commands.
def run_commands(*commands)
run commands.map { |command| "(#{command})" }.join(" && ")
end