From 19666f61ddee55e91f83a5bebfbaf02b605459cc Mon Sep 17 00:00:00 2001 From: Chris Bizon Date: Mon, 15 Jul 2024 13:41:49 -0400 Subject: [PATCH] fixed cache writing --- src/service_aggregator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/service_aggregator.py b/src/service_aggregator.py index cd24c05..2c042d8 100644 --- a/src/service_aggregator.py +++ b/src/service_aggregator.py @@ -194,6 +194,8 @@ async def entry(message, guid, coalesce_type, caller) -> (dict, int): else: logger.info(f"{guid}: Results cache miss") else: + mcq = False + member_ids = [] if read_from_cache: results = results_cache.get_lookup_result(workflow_def, query_graph) if results is not None: @@ -218,7 +220,7 @@ async def entry(message, guid, coalesce_type, caller) -> (dict, int): # so we want to write to the cache if bypass cache is false or overwrite_cache is true if overwrite_cache or (not bypass_cache): if infer: - results_cache.set_result(input_id, predicate, qualifiers, source_input, caller, workflow_def, final_answer) + results_cache.set_result(input_id, predicate, qualifiers, source_input, caller, workflow_def, mcq, member_ids, final_answer) elif {"id": "lookup"} in workflow_def: results_cache.set_lookup_result(workflow_def, query_graph, final_answer)