Skip to content

Commit

Permalink
fixing extract filtering terms
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed May 17, 2024
1 parent 56f43f6 commit 1f5a9a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion beacon/db/extract_filtering_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ def find_ontology_terms_used(collection_name: str) -> List[Dict]:
if term not in terms_ids:
terms_ids.append(term)
i += 10000
if i > 30000:
break
print(i)
else:
xs = client.beacon.get_collection(collection_name).find().skip(0).limit(10000)
Expand Down Expand Up @@ -401,7 +403,8 @@ def merge_terms():
'scopes': array_of_scopes
})
client.beacon.filtering_terms.delete_many({"id": repeated_id})
client.beacon.filtering_terms.insert_many(new_terms)
if new_terms != []:
client.beacon.filtering_terms.insert_many(new_terms)



Expand Down

0 comments on commit 1f5a9a6

Please sign in to comment.