# Import / Export Queues


# EXCEL_QUEUE

Producer: excel-import-export worker Consumer: excel-processor Use case: Direct Excel file imports (not Google Sheets)

Batch limit: 20 messages per sendBatch() call.

# excel_import_batch message

{
  type: 'excel_import_batch',
  job_id: string,
  batch_number: number,
  total_batches: number,
  rows: [
    {
      url: string,
      campaign: string,    // optional
      budget: number,      // optional
      notes: string        // optional
    }
  ],
  organization_id: string,
  user_id: string,
  request_id: string
}

# Queue Flow

excel-import-export worker
  └── POST /excel/import
        ├── INSERT import_jobs
        └── sendBatch() → EXCEL_QUEUE (excel_import_batch × N)
              └── excel-processor
                    ├── Parse URLs, upsert videos
                    └── UPDATE import_jobs (progress)