Skip to content

Bugfix: serialize runs in a background thread - #539

Merged
gusostow merged 1 commit into
mainfrom
bugfix/runs-to-thread
Jul 9, 2026
Merged

Bugfix: serialize runs in a background thread#539
gusostow merged 1 commit into
mainfrom
bugfix/runs-to-thread

Conversation

@gusostow

@gusostow gusostow commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This is endpoint is only called by the apsis runs CLI command. It blocks the event loop for 60s in our environment if called without filters.

Note that I'm going to have to do something about a potential full run store query in the same method, once that is slower from serving the run store from sqlite instead of memory #538.

when, runs = apsis.run_store.query(
run_ids=run_id,
job_id=job_id,
state=None if state is None else to_state(state),
since=since,
with_args=args,
)

@gusostow
gusostow requested a review from LudovicoRighi July 7, 2026 21:25
@gusostow
gusostow merged commit 779a204 into main Jul 9, 2026
1 of 2 checks passed
@gusostow
gusostow deleted the bugfix/runs-to-thread branch July 9, 2026 16:18
@LudovicoRighi

Copy link
Copy Markdown
Collaborator

I've reviewed this PR now, please see:

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