-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Add unified jobs API with /api/jobs endpoints #11054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ae57e94 to
c4b7a84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comment to before -- likely out of scope for this, but can we start introducing some structure to this repo and start breaking up this superclass to separate files for maintainability and extensibility
execution.py
Outdated
| jobs = [] | ||
|
|
||
| if status_filter is None: | ||
| status_filter = ['pending', 'in_progress', 'completed', 'error'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these statuses defined elsewhere in this file? Worth breaking out to an enum to ensure consistency within this file?
57fd19f to
c860cc6
Compare
|
Rebasing |
|
Can you test this properly? The endpoint doesn't work after I run a regular workflow. |
Fixed an issue with preview as text. This endpoint has been working for me otherwise, but I'm stuck with testing light workflows since I'm on a Mac |
c5c3db7 to
1f7c1a9
Compare
1371f61 to
ed61899
Compare
|
rebasing |
Summary
GET /api/jobsendpoint with filtering, sorting, and paginationpending,in_progress,completed,errorcreate_timeorexecution_timelimit/offsetGET /api/jobs/{job_id}for single job details with full outputsexecution_timein history for completed jobsoutputs_countandpreview_outputin job responsestype=output, supports images/video/audio/3D)Motivation
Currently
/queueand/historyare separate endpoints with different response shapes. This unified API provides:outputs_count,preview_output) for list views without fetching full outputsTest plan
pytest tests/execution/test_execution.py -v/api/jobsreturns jobs from queue and history on https://www.github.com/Comfy-Org/ComfyUI_frontend/commit/a57ea57a09a274efdc8444b949452509d7cf49de/api/jobs/{id}returns full job with outputsexecution_timeis tracked for completed jobs