Skip to content

Instantly share code, notes, and snippets.

@wraithan
Forked from bingomanatee/fabfile.py
Created September 15, 2011 20:05
Show Gist options
  • Save wraithan/1220318 to your computer and use it in GitHub Desktop.
Save wraithan/1220318 to your computer and use it in GitHub Desktop.
slipping throught exception handling with fabric
import time
from fabric.api import puts
def update_agi(delay=4):
prep_hosts()
puts('waiting %s seconds for agis to cycle down' % delay)
time.sleep(delay)
fab_lib.kill_rails()
# where ever this is defined
def kill_rails():
# generate command string
puts('destroy all rails')
with settings(warn_only=True):
run(kill_rails_command, shell=False, pty=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment