Skip to content

Create batch video processing API endpoint #8

Description

@clencyc

Description

Allow users to queue multiple videos for processing/analysis in one request instead of doing them one-by-one.

Acceptance Criteria

  • New endpoint: POST /api/batch/analyze
  • Accepts array of video file IDs
  • Returns batch_id for tracking progress
  • Processes videos in parallel (max 3 concurrent)
  • Webhook support: callback when batch completes
  • Progress endpoint: GET /api/batch/{batch_id}/progress
  • Result endpoint: GET /api/batch/{batch_id}/results
  • Database schema updated for batch tracking
  • Unit and integration tests

Implementation Details

  • Request format:
    {
      "videos": ["video_id_1", "video_id_2"],
      "webhook_url": "https://example.com/callback",
      "priority": "normal"
    }
  • Stores batch status in database/cache
  • Uses Celery for async job management
  • Returns job IDs for tracking

Files to Modify

  • LiveEditBackend/app.py - add batch endpoints
  • LiveEditBackend/tasks.py (create) - celery tasks
  • Database migrations for batch table

Difficulty: Hard

Estimated time: 6-7 hours

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions