Skip to content

feat: add queue status API for FC async tasks#82

Open
KoalaBryson wants to merge 3 commits intocapfrom
status_api
Open

feat: add queue status API for FC async tasks#82
KoalaBryson wants to merge 3 commits intocapfrom
status_api

Conversation

@KoalaBryson
Copy link
Collaborator

Add GET /api/serverless/queue endpoint to query FC async task status:

  • Query single task by task_id
  • Query task list with status filter (pending/running/completed/failed)
  • Parallel FC API calls for multi-status queries (pending/failed)
  • FC status mapping to simplified states

Changes:

  • fc_client.py: add get_async_task() and list_async_tasks()
  • serverless_api_routes.py: add /queue route with status mapping
  • Add tests for fc_client and queue route

Change-Id: Iaa4c8290c8ca3357a9c23f3d1cf5b4788920932f
Co-developed-by: Qoder noreply@qoder.com

yinsu.zs added 3 commits March 24, 2026 18:00
Add GET /api/serverless/queue endpoint to query FC async task status:
- Query single task by task_id
- Query task list with status filter (pending/running/completed/failed)
- Parallel FC API calls for multi-status queries (pending/failed)
- FC status mapping to simplified states

Changes:
- fc_client.py: add get_async_task() and list_async_tasks()
- serverless_api_routes.py: add /queue route with status mapping
- Add tests for fc_client and queue route

Change-Id: Iaa4c8290c8ca3357a9c23f3d1cf5b4788920932f
Co-developed-by: Qoder <noreply@qoder.com>
Change-Id: I4788928b41ca238110db9c7d5a1e774cba223e9f
Co-developed-by: Qoder <noreply@qoder.com>
Extract reusable helper functions to eliminate code duplication:
- _get_fc_endpoint_and_function(): get endpoint and GPU function name
- _get_fc_credentials(): get FC credentials
- _build_fc_params(): build common Params with fixed values
- _build_runtime(): build RuntimeOptions

Simplify stop_async_task(), get_async_task(), list_async_tasks() by using
the new helper functions. Reduces ~60 lines of duplicate code.

Change-Id: I0c9b6e8d77f52c39effd9195548fec819d1c0c0a
Co-developed-by: Qoder <noreply@qoder.com>
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.

1 participant