Skip to content

Commit

Permalink
[#2977] Add redis_url configuration option.
Browse files Browse the repository at this point in the history
  • Loading branch information
torfsen committed Sep 12, 2016
1 parent 7ded147 commit b264a85
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ckan/config/deployment.ini_tmpl
Expand Up @@ -79,6 +79,16 @@ ckan.site_id = default
#solr_url = http://127.0.0.1:8983/solr


## Redis Settings

# URL to your Redis instance, including the database to be used. Note
# that you cannot use the same Redis database for more than one CKAN
# instance (although you can use separate databases on the same Redis
# instance).

#redis_url = redis://localhost:6379/0


## CORS Settings

# If cors.origin_allow_all is true, all origins are allowed.
Expand Down
1 change: 1 addition & 0 deletions ckan/config/environment.py
Expand Up @@ -111,6 +111,7 @@ def find_controller(self, controller):
'sqlalchemy.url': 'CKAN_SQLALCHEMY_URL',
'ckan.datastore.write_url': 'CKAN_DATASTORE_WRITE_URL',
'ckan.datastore.read_url': 'CKAN_DATASTORE_READ_URL',
'redis_url': 'CKAN_REDIS_URL',
'solr_url': 'CKAN_SOLR_URL',
'ckan.site_id': 'CKAN_SITE_ID',
'ckan.site_url': 'CKAN_SITE_URL',
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/jobs.py
Expand Up @@ -18,7 +18,7 @@

log = logging.getLogger(__name__)

REDIS_URL_SETTING_NAME = u'ckan.jobs.redis_url'
REDIS_URL_SETTING_NAME = u'redis_url'

REDIS_URL_DEFAULT_VALUE = u'redis://localhost:6379/0'

Expand Down
22 changes: 22 additions & 0 deletions doc/maintaining/configuration.rst
Expand Up @@ -695,6 +695,28 @@ Default value: ``None``
List of the extra resource fields that would be used when searching.


Redis Settings
---------------

.. _redis_url:

redis_url
^^^^^^^^^

Example::

redis_url = redis://localhost:7000/1

Default value: ``redis://localhost:6379/0``

URL to your Redis instance, including the database to be used.

.. note::

If you're hosting multiple CKAN instances then you need to use a separate
Redis database for each of them.


CORS Settings
-------------

Expand Down

0 comments on commit b264a85

Please sign in to comment.