Skip to content

Commit 720a387

Browse files
Fixing the issue when USE_REDIS_CACHE is set to 0
1 parent 601e8ea commit 720a387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ServiceBusQueueNewDocument/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def main(msg: func.ServiceBusMessage):
4848

4949
logging.info(f"Generated {len(emb_documents)} emb chunks from doc {json_filename}")
5050

51-
if (REDIS_ADDR is not None) and (REDIS_ADDR != ''):
51+
if (REDIS_ADDR is not None) and (REDIS_ADDR != '') and (USE_REDIS_CACHE == 1):
5252
loaded = helpers.load_embedding_docs_in_redis(emb_documents, document_name = json_filename)
5353
logging.info(f"Loaded into Redis {loaded} emb chunks from doc {json_filename}")
5454
print(f"Loaded into Redis {loaded} emb chunks from doc {json_filename}")

0 commit comments

Comments
 (0)