Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why I don't automatically retry timed-out AI video requests

Описание и применение

При тайм‑ауте запроса генерации видео система записывает маркер отправки до обращения к внешнему API, чтобы избежать дублирования платных задач и направлять работу в ручной режим при неопределенности.

Задача

When a video generation request times out, retrying can unintentionally create duplicate paid tasks because the provider may already be rendering the original request.

Результат

By recording a submission marker before external calls and distinguishing job states, the workflow avoids duplicate paid tasks, reduces unnecessary retries, and provides clear paths for manual review and credit restoration.

Рабочий процесс

  • Record a submission timestamp before calling the generation API
  • If no submission marker and no provider ID, claim the job, record the attempt, then submit
  • If a provider ID exists, query that existing task
  • If a submission marker exists but no provider ID, hold the job for support review
  • If an output URL is already recorded, continue processing or saving that video
  • For failed storage, record source video URL to resume from existing output
  • Apply bounded retries to the soundtrack step and fall back to silent footage if exhausted
  • Restore user credits on confirmed generation failure, reserve ambiguous submissions for investigation

Доказательства

The database updates are conditional, and processing uses a short lease so overlapping workers don't casually pick up the same job.

Источник

If the worker crashes after writing the marker but before sending the request, the job also ends up waiting for review.

Источник

A provider-side idempotency key would be a better way to close that gap.

Источник

  • Дата записи: 2026-11-02T03:58:47.494Z