mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Add task decorator to fabric example
This commit is contained in:
@@ -20,10 +20,11 @@ and restart the application server.
|
||||
|
||||
::
|
||||
|
||||
from fabric.api import env, cd, run, prefix
|
||||
from fabric.api import cd, env, prefix, run, task
|
||||
|
||||
env.hosts = ['my_server1', 'my_server2']
|
||||
|
||||
@task
|
||||
def deploy():
|
||||
with cd('/var/www/project-env/project'):
|
||||
with prefix('. ../bin/activate'):
|
||||
|
||||
Reference in New Issue
Block a user