Skip to content

Instantly share code, notes, and snippets.

@198d
Last active December 20, 2015 12:49
Show Gist options
  • Save 198d/6133765 to your computer and use it in GitHub Desktop.
Save 198d/6133765 to your computer and use it in GitHub Desktop.
@task
@roles('web')
def deploy():
action1()
action2()
action3()
action4()
action5()
execute(reindex)
action6()
action7()
@task
@roles('search')
def reindex():
run('reindex')
@task
@roles('web')
def deploy():
def before():
action1()
action2()
action3()
action4()
action5()
def after():
action6()
action7()
execute(before, roles=['web'])
execute(reindex, roles=['search'])
execute(after, roles=['web'])
@task
def reindex():
run('reindex')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment