Skip to content

Commit

Permalink
fix error where standards would get preloaded twice
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Jun 27, 2024
1 parent 702b336 commit 85c2fd0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions application/utils/gap_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,13 @@ def calculate_a_to_b(sa: str, sb: str) -> bool:
if sa == sb:
continue
waiting.append(f"{sa}->{sb}")
waiting.append(f"{sb}->{sa}")
while len(waiting):
for sa in standards:
for sb in standards:
if sa == sb:
continue
if calculate_a_to_b(sa, sb):
waiting.remove(f"{sa}->{sb}") if f"{sa}->{sb}" in waiting else ""
if calculate_a_to_b(sb, sa):
waiting.remove(f"{sb}->{sa}") if f"{sb}->{sa}" in waiting else ""
print(f"calculating {len(waiting)} gap analyses")
time.sleep(30)
print("map analysis preloaded successfully")

0 comments on commit 85c2fd0

Please sign in to comment.