Skip to content

Conversation

@JoeGaffney
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 4, 2026 21:08
Copy link
Contributor

Copilot AI left a 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_info field to all response schemas (images, videos, texts, workflows) to expose task metadata from Flower
  • Refactors context classes to use nullable task_id parameters and extracts get_output_path methods for better code organization
  • Reorganizes output file storage to use feature-based directory structure (e.g., images/model/ instead of just model/)

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

@JoeGaffney JoeGaffney changed the title 2026 01 04 feature: task metadata exposure via Flower API integration, consolidates helper functions, and reorganizes output file storage paths Jan 5, 2026
@JoeGaffney JoeGaffney merged commit 7156e07 into main Jan 5, 2026
4 checks passed
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