Commits

theoden  committed c13848e

- decorator for_all_apps was eliminated

  • Participants
  • Parent commits 9a2eb48
  • Branches multiple web-servers

Comments (0)

Files changed (1)

File fab_deploy/project.py

 
 __all__ = ['WebProject']
 
-def for_all_apps(func):
-    """
-    Decorator for project methods. Calls project method and then method with
-    the same name for each of the project apps.
-    """
-    @wraps(func)
-    def app_operation(self, *args, **kwargs):
-        func(self, *args, **kwargs)
-        for app in env.conf.APPS:
-            app_func = getattr(app, func.__name__)
-            app_func(*args, **kwargs)
-    return app_operation
-
 class WebProject(TaskSet):
 
     @task_method
         database.install()
 
     @task_method
-    @for_all_apps
     def deploy(self):
         pip.virtualenv_create()
         self._make_clone()
         pip.install_r(env.conf.PIP_REQUIREMENTS, restart=False)
+        for app in env.conf.APPS:
+            app.deploy()
 
     @task_method
     def _make_clone(self):
             run('rm -rf %s' % env.conf.ENV_DIR + '/' + folder)
 
     @task_method
-    @for_all_apps
     def update_web_servers(self):
-        pass
+        for app in env.conf.APPS:
+            app.update_web_servers()
 
     @task_method
     def up(self, branch=None, before_restart=lambda: None):