changeset 880:bab6b1eac1e2

Merge with upstream.
author Brian Neal <bgneal@gmail.com>
date Sat, 03 Jan 2015 19:19:03 -0600
parents d5d8e90d08b5 (current diff) a423e8fd082d (diff)
children 13f2d4393ec4
files
diffstat 7 files changed, 18 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/core/services.py	Thu Dec 25 17:28:48 2014 -0600
+++ b/core/services.py	Sat Jan 03 19:19:03 2015 -0600
@@ -11,11 +11,15 @@
 REDIS_HOST = getattr(settings, 'REDIS_HOST', 'localhost')
 REDIS_PORT = getattr(settings, 'REDIS_PORT', 6379)
 REDIS_DB = getattr(settings, 'REDIS_DB', 0)
+REDIS_SOCKET = getattr(settings, 'REDIS_UNIX_SOCKET', None)
 
 
-def get_redis_connection(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB):
+def get_redis_connection(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB,
+                         unix_socket_path=REDIS_SOCKET):
     """
     Create and return a Redis connection using the supplied parameters.
 
     """
+    if unix_socket_path:
+        return redis.StrictRedis(unix_socket_path=unix_socket_path, db=db)
     return redis.StrictRedis(host=host, port=port, db=db)
--- a/requirements.txt	Thu Dec 25 17:28:48 2014 -0600
+++ b/requirements.txt	Sat Jan 03 19:19:03 2015 -0600
@@ -9,7 +9,7 @@
 bleach==1.4
 pytz==2013b
 queued-search==2.1.0
-queues==0.6.3
+hg+https://bgneal@bitbucket.org/bgneal/queues@862e884#egg=queues
 redis==2.7.2
 repoze.timeago==0.5
 -e git+https://github.com/notanumber/xapian-haystack.git@37add92bc43fe50bf165e91f370269c26272f1eb#egg=xapian_haystack-dev
--- a/requirements_dev.txt	Thu Dec 25 17:28:48 2014 -0600
+++ b/requirements_dev.txt	Sat Jan 03 19:19:03 2015 -0600
@@ -10,7 +10,7 @@
 bleach==1.4
 pytz==2013b
 queued-search==2.1.0
-queues==0.6.3
+hg+https://bgneal@bitbucket.org/bgneal/queues@862e884#egg=queues
 redis==2.7.2
 repoze.timeago==0.5
 -e git+https://github.com/notanumber/xapian-haystack.git@37add92bc43fe50bf165e91f370269c26272f1eb#egg=xapian_haystack-master
--- a/sg101/settings/base.py	Thu Dec 25 17:28:48 2014 -0600
+++ b/sg101/settings/base.py	Sat Jan 03 19:19:03 2015 -0600
@@ -202,14 +202,13 @@
 #######################################################################
 # Redis integration & settings
 #######################################################################
-REDIS_HOST = 'localhost'
-REDIS_PORT = 6379
+REDIS_UNIX_SOCKET = '/var/run/redis/redis.sock'
 REDIS_DB = 0
 
 #######################################################################
 # Celery integration & settings
 #######################################################################
-BROKER_URL = 'redis://localhost:6379/1'
+BROKER_URL = 'redis+socket:///var/run/redis/redis.sock?virtual_host=1'
 BROKER_POOL_LIMIT = 10
 
 CELERY_TIMEZONE = TIME_ZONE
@@ -301,7 +300,7 @@
 # Asynchronous settings (queues, queued_search, redis, celery, etc)
 #######################################################################
 QUEUE_BACKEND = 'redisd'
-QUEUE_REDIS_CONNECTION = 'localhost:6379'
+QUEUE_REDIS_UNIX_SOCKET = REDIS_UNIX_SOCKET
 QUEUE_REDIS_DB = 0
 
 #######################################################################
--- a/sg101/settings/local.py	Thu Dec 25 17:28:48 2014 -0600
+++ b/sg101/settings/local.py	Sat Jan 03 19:19:03 2015 -0600
@@ -12,6 +12,9 @@
         'NAME': SECRETS['DB_NAME'],
         'USER': SECRETS['DB_USER'],
         'PASSWORD': SECRETS['DB_PASSWORD'],
+        'OPTIONS': {
+            'unix_socket': '/var/run/mysqld/mysqld.sock',
+        },
     },
 }
 
--- a/sg101/settings/production.py	Thu Dec 25 17:28:48 2014 -0600
+++ b/sg101/settings/production.py	Sat Jan 03 19:19:03 2015 -0600
@@ -14,6 +14,9 @@
         'NAME': SECRETS['DB_NAME'],
         'USER': SECRETS['DB_USER'],
         'PASSWORD': SECRETS['DB_PASSWORD'],
+        'OPTIONS': {
+            'unix_socket': '/var/run/mysqld/mysqld.sock',
+        },
     },
 }
 
@@ -33,7 +36,7 @@
 CACHES = {
     'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
-        'LOCATION': '127.0.0.1:11211',
+        'LOCATION': 'unix:/var/run/memcached/memcached.sock',
         'TIMEOUT': 600,
         'KEY_PREFIX': 'sg101',
     },
--- a/sg101/templates/core/mp3comp_block.html	Thu Dec 25 17:28:48 2014 -0600
+++ b/sg101/templates/core/mp3comp_block.html	Sat Jan 03 19:19:03 2015 -0600
@@ -10,4 +10,5 @@
 <a target="_blank" href="http://www.archive.org/details/Surfguitar101.com2011Mp3Compilation">2011</a>
 <a target="_blank" href="http://archive.org/details/Surfguitar101.com2012Mp3Compilation">2012</a>
 <a target="_blank" href="https://archive.org/details/Surfguitar101.com2013Mp3Compilation">2013</a>
+<a target="_blank" href="https://archive.org/details/Surfguitar101.com2014Mp3Compilation">2014</a>
 {% endblock %}