use redis in production environment for pub/sub instead of polling

pull/1/head
Ed Summers 2011-10-20 05:18:04 +00:00
parent a79de596bb
commit dbcd8e3465
4 changed files with 8 additions and 5 deletions

View File

@ -41,7 +41,7 @@ Below are the steps for getting regluit running on EC2 with Apache and mod_wsgi,
1. create an ubuntu natty ec2 instance using ami-1aad5273
1. `sudo aptitude update`
1. `sudo aptitude upgrade`
1. `sudo aptitude install git apache libapache2-mod-wsgi mysql-client python-virtualenv python-mysqldb`
1. `sudo aptitude install git apache libapache2-mod-wsgi mysql-client python-virtualenv python-mysqldb redis-server`
1. `sudo mkdir /opt/regluit`
1. `sudo chown ubuntu:ubuntu /opt/regluit`
1. `cd /opt`

View File

@ -8,4 +8,4 @@ def add_related(isbn):
@task
def add_by_isbn(isbn):
bookloader.add_isbn(isbn)
bookloader.add_by_isbn(isbn)

View File

@ -11,3 +11,4 @@ nose
django-profiles
django-kombu
django-celery
redis

View File

@ -70,6 +70,8 @@ PAYPAL_TEST_NONPROFIT_PARTNER_EMAIL = ""
BASE_URL = 'http://0.0.0.0/'
# use database as queuing service in development
BROKER_TRANSPORT = "djkombu.transport.DatabaseTransport"
INSTALLED_APPS += ("djkombu",)
# use redis for production queue
BROKER_TRANSPORT = "redis"
BROKER_HOST = "localhost"
BROKER_PORT = 6379
BROKER_VHOST = "0"