Making a 90-second audio render job safe under payment webhook retries
A developer building a made-to-order song generator found that slow audio rendering behind a checkout button creates retry hazards across the queue, worker, file storage, and notifications. Payment providers retry webhooks when endpoints are slow, which can duplicate orders and jobs unless handlers are idempotent. The fix combines provider event IDs stored under a unique constraint, deterministic job IDs derived from order IDs, and a worker that treats an existing output file as complete. The author also found that generating preview clips before the paid render cut support complaints and limited costly work to accepted briefs. The remaining failures came from webhook retries and a worker that died mid-job, leaving an order stuck, which a sweeper process was added to address.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in