From c3f4269029ccc8d53999c3c0e799e4e1689bc18e Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Sun, 1 Aug 2010 14:21:41 -0700 Subject: [PATCH] added celery-based async tasks --- README.txt | 11 +++++++++++ helios | 2 +- settings.py.sample | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 2d89f2c..7729347 100644 --- a/README.txt +++ b/README.txt @@ -5,3 +5,14 @@ LICENSE: this code is released under the GPL v3 or later. NEEDS: - http://github.com/openid/python-openid +- rabbitmq 1.8 +-- http://www.rabbitmq.com/debian.html +-- update the deb source +-- apt-get install rabbitmq-server + +- celery 2.0.2 and django-celery 2.0.2 for async jobs +-- http://celeryq.org +-- apt-get install python-setuptools +-- easy_install celery +-- easy_install django-celery + diff --git a/helios b/helios index 029425d..50eaae0 160000 --- a/helios +++ b/helios @@ -1 +1 @@ -Subproject commit 029425d7535a357cb81a0a6d8617ea8028495512 +Subproject commit 50eaae0e1b9c30d52798d4fc65a8800a7aa19ecb diff --git a/settings.py.sample b/settings.py.sample index a16b898..20c12a0 100644 --- a/settings.py.sample +++ b/settings.py.sample @@ -77,6 +77,9 @@ INSTALLED_APPS = ( 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', + ## needed for queues + 'djcelery', + ## HELIOS stuff 'auth', 'helios', 'server_ui', @@ -130,3 +133,12 @@ logging.basicConfig( format = '%(asctime)s %(levelname)s %(message)s' ) +# set up django-celery +BROKER_HOST = "localhost" +BROKER_PORT = 5672 +BROKER_USER = "guest" +BROKER_PASSWORD = "guest" +BROKER_VHOST = "/" + +import djcelery +djcelery.setup_loader() -- GitLab