Celery redis setup and Jobs endpoint#574
Open
chetanr25 wants to merge 7 commits into
Open
Conversation
marcvergees
approved these changes
Jun 20, 2026
8278c4b to
0e51886
Compare
…ocker image, updated celery broker url to use redis endpoint. Added required packages.
0e51886 to
60e1ce5
Compare
marcvergees
reviewed
Jun 21, 2026
marcvergees
left a comment
Member
There was a problem hiding this comment.
In general looks good to me, but I wanna be given answers of my questions before merging it.
| api_router.include_router(templates.router) | ||
| api_router.include_router(forms.router) | ||
| api_router.include_router(v1_router) | ||
| api_router.include_router(jobs.router) No newline at end of file |
Member
There was a problem hiding this comment.
Shouldn't it be inside the v1_router? I.e. the endpoints shouldn't in be inside the v1 folder? Like Abhi did in his PR?
| raise RuntimeError(f"No job row for celery task {self.request.id}") | ||
|
|
||
| job.status = "processing" | ||
| job.progress_percent = 10 |
Member
There was a problem hiding this comment.
This value hardcoded is to know that the task is already being processed so that you had to change the progress_percent to smthg bigger than 0?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add async background workers with Celery + Redis
Summary
GET /api/v1/jobs/{job_id}endpoint for polling any async job status, as defined in the API contract (contracts/path/jobs.yaml)contracts/schemas/common.yaml#/Job:job_idjob_typeenum (form_generation, extensible totranscription,extraction,report_generation)progress_percent(0-100)result_urlpointing to API download patherrorobject (error_code+message)queued->processing->completed/failedredis(broker) andcelery-workerservices to Docker Composefill_form_task) updates job progress and status on each transitionFix: #498
Part of: #541