Skip to content

DIG-2136: a few more optimizations#382

Merged
daisieh merged 7 commits intodevelopfrom
daisieh/optimize
Dec 4, 2025
Merged

DIG-2136: a few more optimizations#382
daisieh merged 7 commits intodevelopfrom
daisieh/optimize

Conversation

@daisieh
Copy link
Member

@daisieh daisieh commented Dec 4, 2025

I don't think this speeds much up, but it picks up the experiments endpoint from drs so that htsget only deals with the experiments, not all the drs objects. I also moved some service token calls so that they only happen once.

@daisieh daisieh requested a review from OrdiNeu December 4, 2025 04:13
Copy link
Contributor

@OrdiNeu OrdiNeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, haven't tested it though

response = requests.get(url=f"{os.getenv("DRS_URL")}/ga4gh/drs/v1/objects/{experiment_id}", headers=headers)
response = requests.get(url=f"{os.getenv("DRS_URL")}/ga4gh/drs/v1/objects/{experiment_id}", headers=req_headers)
experiment_obj = None
if response.status_code == 200:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: If the token times out during this request, the response.status check here can be inaccurate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it seems pretty unlikely for the token to expire during this file handling (30 minutes) and I'm not sure it's worth it to catch the exceptional case...what do you think?

@daisieh daisieh merged commit 4ec4192 into develop Dec 4, 2025
1 check passed
@daisieh daisieh deleted the daisieh/optimize branch December 4, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants