dispatcher.ts 906 B

12345678910111213141516171819202122
  1. /**
  2. * Transcode Dispatcher
  3. * ─────────────────────────────────────────────────────
  4. * Since the transcode worker runs as a SEPARATE Docker service (worker/),
  5. * this module is a no-op stub. The API just creates an asset with
  6. * transcodeStatus = PENDING and the worker picks it up from the DB.
  7. *
  8. * This file exists so that other code (e.g. routes/assets.ts) can
  9. * import { startTranscodeJob } without changes.
  10. */
  11. export interface TranscodeJob {
  12. assetId: string;
  13. videoPath: string;
  14. outputDir: string;
  15. }
  16. /** No-op — the worker service polls the DB. */
  17. export function startTranscodeJob(job: TranscodeJob): void {
  18. // Worker handles it — nothing to do here.
  19. // But we validate the asset row so it starts in PENDING state.
  20. // (already done by the upload route before calling this)
  21. }