Skip to content
Snippets Groups Projects
Commit 31a0e241 authored by Erik Reid's avatar Erik Reid
Browse files

added optional index param for use with celery

parent 78fd443b
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ CONFIG_SCHEMA = {
"properties": {
"hostname": {"type": "string"},
"port": {"type": "integer"},
"index": {"type": "integer"},
"socket_timeout": {"$ref": "#/definitions/timeout"}
},
"required": ["hostname", "port"],
......@@ -47,6 +48,7 @@ CONFIG_SCHEMA = {
"properties": {
"hostname": {"type": "string"},
"port": {"type": "integer"},
"index": {"type": "integer"},
"name": {"type": "string"},
"redis_socket_timeout": {"$ref": "#/definitions/timeout"},
"sentinel_socket_timeout": {"$ref": "#/definitions/timeout"}
......
......@@ -35,7 +35,7 @@ if 'redis_socket_timeout' in params:
_broker_hostname = params['hostname']
_broker_port = params['port']
_broker_db_index = 1 # TODO: this should be a config param
_broker_db_index = params.get('index', 1)
if ':' in _broker_hostname:
# assume this means hostname is an ipv6 address
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment