Skip to content

Commit

Permalink
Merge branch 'main' into transitive_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
cbizon committed Jul 17, 2024
2 parents 8665139 + 58e677c commit 180c47a
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/service_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -868,19 +870,21 @@ def get_infer_parameters(input_message):
qualifiers = {}
else:
qualifiers = {"qualifier_constraints": qc}
if ("ids" in input_message["message"]["query_graph"]["nodes"][source]) \
and (input_message["message"]["query_graph"]["nodes"][source]["ids"] is not None):
input_id = input_message["message"]["query_graph"]["nodes"][source]["ids"][0]
member_ids = input_message["message"]["query_graph"]["nodes"][source].get("member_ids",[])
mcq = False
snode = input_message["message"]["query_graph"]["nodes"][source]
tnode = input_message["message"]["query_graph"]["nodes"][target]
if ("ids" in snode) and (snode["ids"] is not None):
input_id = snode["ids"][0]
member_ids = snode.get("member_ids",[])
if "set_interpretation" in snode and snode["set_interpretation"] == "MANY":
mcq = True
source_input = True
else:
input_id = input_message["message"]["query_graph"]["nodes"][target]["ids"][0]
member_ids = input_message["message"]["query_graph"]["nodes"][target].get("member_ids",[])
input_id = tnode["ids"][0]
member_ids = tnode.get("member_ids",[])
if "set_interpretation" in tnode and tnode["set_interpretation"] == "MANY":
mcq = True
source_input = False
mcq = False
if ("set_interpretation" in input_message["message"]["query_graph"] and
input_message["message"]["query_graph"]["set_interpretation"] == "MANY"):
mcq = True
#key = get_key(predicate, qualifiers)
return input_id, predicate, qualifiers, source, source_input, target, query_edge, mcq, member_ids

Expand Down

0 comments on commit 180c47a

Please sign in to comment.