-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
app: backendTask implementation touches the backendTask implementation touches the backendtype: enhancementEnhancement to an existing featureEnhancement to an existing feature
Description
You could simplify this queue logic by building the strings up front and then batching the list with the batched function from mavedb/lib/utils.py.
In pseudocode, you would:
hgvs_strings = []
for mv in mapped_variants:
append hgvs to hgvs_strings, warn on missing
for hgvs_batch in batched(hgvs_strings, 200):
get_functional_consequence(hgvs_batch)
existing logic ...
Implemented like this, we don't have to handle a half filled queue or worry about checking the queue length at all. We just generate the list of items we'd like to annotate, batch them, and handle all requests and results identically.
Originally posted by @bencap in #553 (comment)
Metadata
Metadata
Assignees
Labels
app: backendTask implementation touches the backendTask implementation touches the backendtype: enhancementEnhancement to an existing featureEnhancement to an existing feature