From 6bd6eda1f20d030e17fdb0e057d64e8fe9a5e36c Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 9 Aug 2011 14:48:30 +0200 Subject: [PATCH] fabric connection close --- apps/archive/tasks.py | 2 ++ requirements.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/archive/tasks.py b/apps/archive/tasks.py index 27b6d00..37169d2 100755 --- a/apps/archive/tasks.py +++ b/apps/archive/tasks.py @@ -11,6 +11,7 @@ from time import sleep #from celery.decorators import task from celery.task import Task from fabric import api +from fabric.network import disconnect_all from mutagen import File from mutagen import id3 @@ -83,6 +84,7 @@ class AudioFormatTask(Task): api.sudo(command, user=UPLOAD_SUDO, shell=False) else: api.run(command) + disconnect_all() def run(self, aid): audiobook = Audiobook.objects.get(id=aid) diff --git a/requirements.txt b/requirements.txt index 899e65b..de03c23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,5 +6,5 @@ django-celery django-kombu paramiko>=1.7.7.1 # fabric dependency with http://code.fabfile.org/issues/show/214 fixed -fabric +fabric>=1.0 mutagen -- 2.20.1