Skip to content
Snippets Groups Projects
Commit 34e62027 authored by Robert Latta's avatar Robert Latta
Browse files

Merge branch 'feature/POL1-571' into develop

parents d5b112ef 89f50376
No related branches found
No related tags found
No related merge requests found
......@@ -137,7 +137,8 @@ def after_request(response):
return response
def _redis_client_proc(key_queue, value_queue, config_params, doc_type):
def _redis_client_proc(
key_queue, value_queue, config_params, doc_type, use_next_redis=False):
"""
create a local redis connection with the current db index,
lookup the values of the keys that come from key_queue
......@@ -165,7 +166,10 @@ def _redis_client_proc(key_queue, value_queue, config_params, doc_type):
return etree.XML(value)
try:
r = tasks_common.get_current_redis(config_params)
if use_next_redis:
r = tasks_common.get_next_redis(config_params)
else:
r = tasks_common.get_current_redis(config_params)
while True:
key = key_queue.get()
......@@ -215,7 +219,7 @@ def _load_redis_docs(
q = queue.Queue()
t = threading.Thread(
target=_redis_client_proc,
args=[q, response_queue, config_params, doc_type])
args=[q, response_queue, config_params, doc_type, use_next_redis])
t.start()
threads.append({'thread': t, 'queue': q})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment