Browse Source

Use CELERY_REDIS_* settings instead of REDIS_*

Ask Solem 13 years ago
parent
commit
69d10bce18
4 changed files with 38 additions and 23 deletions
  1. 16 1
      Changelog
  2. 4 4
      celery/tests/config.py
  3. 15 15
      docs/configuration.rst
  4. 3 3
      docs/tutorials/otherqueues.rst

+ 16 - 1
Changelog

@@ -114,6 +114,21 @@ News
         Soft time limits will still not work on Windows or other platforms
         that do not have the ``SIGUSR1`` signal.
 
+* Redis backend configuration directive names changed to include the
+   ``CELERY_`` prefix.
+
+
+    =====================================  ===================================
+    **Old setting name**                   **Replace with**
+    =====================================  ===================================
+    `REDIS_HOST`                           `CELERY_REDIS_HOST`
+    `REDIS_PORT`                           `CELERY_REDIS_PORT`
+    `REDIS_DB`                             `CELERY_REDIS_DB`
+    `REDIS_PASSWORD`                       `CELERY_REDIS_PASSWORD`
+    =====================================  ===================================
+
+    The old names are still supported, but pending deprecation.
+
 .. _version-2.2.7:
 
 2.2.7
@@ -3267,7 +3282,7 @@ Fixes
 
 * Caches are now also limited in size, so their memory usage doesn't grow
   out of control.
-  
+
     You can set the maximum number of results the cache
     can hold using the :setting:`CELERY_MAX_CACHED_RESULTS` setting (the
     default is five thousand results). In addition, you can refetch already

+ 4 - 4
celery/tests/config.py

@@ -22,7 +22,7 @@ TT_HOST = os.environ.get("TT_HOST") or "localhost"
 TT_PORT = int(os.environ.get("TT_PORT") or 1978)
 
 # Redis results tests (only executed if installed and running)
-REDIS_HOST = os.environ.get("REDIS_HOST") or "localhost"
-REDIS_PORT = int(os.environ.get("REDIS_PORT") or 6379)
-REDIS_DB = os.environ.get("REDIS_DB") or 0
-REDIS_PASSWORD = os.environ.get("REDIS_PASSWORD")
+CELERY_REDIS_HOST = os.environ.get("REDIS_HOST") or "localhost"
+CELERY_REDIS_PORT = int(os.environ.get("REDIS_PORT") or 6379)
+CELERY_REDIS_DB = os.environ.get("REDIS_DB") or 0
+CELERY_REDIS_PASSWORD = os.environ.get("REDIS_PASSWORD")

+ 15 - 15
docs/configuration.rst

@@ -349,31 +349,31 @@ Redis backend settings
 
 This backend requires the following configuration directives to be set.
 
-.. setting:: REDIS_HOST
+.. setting:: CELERY_REDIS_HOST
 
-REDIS_HOST
-~~~~~~~~~~
+CELERY_REDIS_HOST
+~~~~~~~~~~~~~~~~~
 
 Host name of the Redis database server. e.g. `"localhost"`.
 
-.. setting:: REDIS_PORT
+.. setting:: CELERY_REDIS_PORT
 
-REDIS_PORT
-~~~~~~~~~~
+CELERY_REDIS_PORT
+~~~~~~~~~~~~~~~~~
 
 Port to the Redis database server. e.g. `6379`.
 
-.. setting:: REDIS_DB
+.. setting:: CELERY_REDIS_DB
 
-REDIS_DB
-~~~~~~~~
+CELERY_REDIS_DB
+~~~~~~~~~~~~~~~
 
 Database number to use. Default is 0
 
-.. setting:: REDIS_PASSWORD
+.. setting:: CELERY_REDIS_PASSWORD
 
-REDIS_PASSWORD
-~~~~~~~~~~~~~~
+CELERY_REDIS_PASSWORD
+~~~~~~~~~~~~~~~~~~~~~
 
 Password used to connect to the database.
 
@@ -383,9 +383,9 @@ Example configuration
 .. code-block:: python
 
     CELERY_RESULT_BACKEND = "redis"
-    REDIS_HOST = "localhost"
-    REDIS_PORT = 6379
-    REDIS_DB = 0
+    CELERY_REDIS_HOST = "localhost"
+    CELERY_REDIS_PORT = 6379
+    CELERY_REDIS_DB = 0
 
 .. _conf-mongodb-result-backend:
 

+ 3 - 3
docs/tutorials/otherqueues.rst

@@ -37,9 +37,9 @@ Results
 You probably also want to store results in Redis::
 
     CELERY_RESULT_BACKEND = "redis"
-    REDIS_HOST = "localhost"
-    REDIS_PORT = 6379
-    REDIS_DB = 0
+    CELERY_REDIS_HOST = "localhost"
+    CELERY_REDIS_PORT = 6379
+    CELERY_REDIS_DB = 0
 
 For a complete list of options supported by the Redis result backend see
 :ref:`conf-redis-result-backend`