-
Notifications
You must be signed in to change notification settings - Fork 1
feature: task metadata exposure via Flower API integration, consolidates helper functions, and reorganizes output file storage paths #64
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
Conversation
…d bug getting the new id for the task
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.
Pull request overview
This PR refactors task management and storage paths across the codebase. It adds task metadata exposure via Flower API integration, consolidates helper functions, and reorganizes output file storage paths.
- Adds
task_infofield to all response schemas (images, videos, texts, workflows) to expose task metadata from Flower - Refactors context classes to use nullable
task_idparameters and extractsget_output_pathmethods for better code organization - Reorganizes output file storage to use feature-based directory structure (e.g.,
images/model/instead of justmodel/)
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
api/common/task_helpers.py |
New file consolidating cancel_task, get_task_info, and truncate_strings functions |
api/common/config.py |
Adds flower_url configuration setting |
api/utils/utils.py |
Removes cancel_task function (moved to task_helpers) |
api/images/schemas.py |
Adds task_info dict field to ImageResponse |
api/images/router.py |
Updates import and populates task_info in GET response |
api/videos/schemas.py |
Adds task_info dict field to VideoResponse |
api/videos/router.py |
Updates import and populates task_info in GET response |
api/texts/schemas.py |
Adds task_info dict field to TextResponse |
api/texts/router.py |
Updates import and populates task_info in GET response |
api/workflows/schemas.py |
Adds task_info dict field to WorkflowResponse |
api/workflows/router.py |
Updates import and populates task_info in GET response |
workers/images/schemas.py |
Synced from API via make copy-schemas |
workers/images/context.py |
Refactors task_id param to nullable, extracts get_output_path, changes storage path to images/{model}/ |
workers/videos/schemas.py |
Synced from API via make copy-schemas |
workers/videos/context.py |
Refactors task_id param to nullable, extracts get_output_path, changes storage path to videos/{model}/, renames method from get_output_video_path |
workers/videos/external/sora_2.py |
Updates method call to get_output_path |
workers/texts/schemas.py |
Synced from API via make copy-schemas |
workers/workflows/schemas.py |
Synced from API via make copy-schemas |
workers/workflows/context.py |
Refactors task_id param to nullable, extracts get_output_path, changes storage path to workflows/comfy-workflow/ |
workers/workflows/comfy/comfy_client.py |
Renames connect_websocket to _connect_websocket (private), removes base64 encoding from download_file return |
clients/openapi.json |
Regenerated OpenAPI spec with task_info field in all response schemas |
Makefile |
Adds test-worker-workflows target for workflow-specific testing |
No description provided.