Skip to content

explore the use of a task manager for long queries #46

@havok2063

Description

@havok2063

We can have long-running queries that currently block a user from doing anything else. For example, searches on SDSS programs, without any other constraints can result in up to ~15 minutes queries. We should explore implementing a task-manager, e.g. https://taskiq-python.github.io/ as a way to offload long-running jobs.

I think we'd want something that manages the background task or query, and does not block Valis or Zora. Ideally we'd have a way to track the status of the job: e.g. running, completed, error, and potentially have a dashboard of jobs. Another consideration is anonymous versus user tasks and if we need one or the other or both.

FastAPI has some support for Background Tasks . I'm not sure if this is enough for our purposes. Other related packages:

I do like Taskiq as a simpler, more modern approach, but we may want to consider alternatives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions