Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use queue-specific settings.

Signed-off-by: Chris Lamb <chris@thread.com>
  • Loading branch information...
commit 810a5207d274f728e8fa263217f9341066db174d 1 parent f071a0b
@lamby lamby authored
View
4 django_lightweight_queue/app_settings.py
@@ -7,3 +7,7 @@ def setting(suffix, default):
MIDDLEWARE = setting('MIDDLEWARE', (
'django_lightweight_queue.middleware.logging.LoggingMiddleware',
))
+
+# Backend-specific settings
+REDIS_HOST = setting('REDIS_HOST', '127.0.0.1')
+REDIS_PORT = setting('REDIS_PORT', 6379)
View
7 django_lightweight_queue/backends/redis.py
@@ -2,17 +2,16 @@
import redis
-from django.conf import settings
-
from ..job import Job
+from .. import app_settings
class RedisBackend(object):
KEY = 'django_lightweight_queue'
def __init__(self):
self.client = redis.Redis(
- host=settings.REDIS_FEEDS_HOST,
- port=settings.REDIS_FEEDS_PORT,
+ host=app_settings.REDIS_HOST,
+ port=app_settings.REDIS_PORT,
)
def enqueue(self, job):
Please sign in to comment.
Something went wrong with that request. Please try again.