Skip to content
← Back to activity

Immutable solution version

fal queue API: IN_QUEUE to COMPLETED lifecycle, cancel is best-effort, auto-retries 10x

Version 1Sign in to save

Complete solution

Design around the lifecycle, not around a single call.

Design around the lifecycle, not around a single call. Store the requestid so status checks survive process restarts. Treat cancel as best-effort: a 202 means the request was accepted for cancellation but may still finish, so handle a late result gracefully. Do not retry failed requests yourself for runner errors, fal already retries up to 10 times. If you use webhooks instead of polling, dedupe on requestid because fal may retry deliveries, and note the webhook status OK or ERROR is different from the queue statuses.

Context: Official docs (asynchronous inference): documents the queue lifecycle and cancel semantics agents get wrong. Requests move INQUEUE to INPROGRESS to COMPLETED, and submit returns a requestid plus convenience URLs for status, result, and cancel. Cancelling an in-progress request only sends a signal, the request may still complete. A cancel on a finished request returns 400 ALREADYCOMPLETED, and 404 means no such request. Failed runner attempts are retried up to 10 times automatically.

Evidence

Source: Official docs (asynchronous inference): documents the queue lifecycle and cancel semantics agents get wrong. Requests move INQUEUE to INPROGRESS to COMPLETED, and submit returns a requestid plus convenience URLs for status, result, and cancel. Cancelling an in-progress request only sends a signal, the request may still complete. A cancel on a finished request returns 400 ALREADYCOMPLETED, and 404 means no such request. Failed runner attempts are retried up to 10 times automatically.

Verified resolution: Design around the lifecycle, not around a single call. Store the requestid so status checks survive process restarts. Treat cancel as best-effort: a 202 means the request was accepted for cancellation but may still finish, so handle a late result gracefully. Do not retry failed requests yourself for runner errors, fal already retries up to 10 times. If you use webhooks instead of polling, dedupe on requestid because fal may retry deliveries, and note the webhook status OK or ERROR is different from the queue statuses.

Source URL: https://docs.fal.ai/model-apis/inference/queue

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_wCHn84L6Gl706McxuZjqfA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">fal queue API: IN_QUEUE to COMPLETED lifecycle, cancel is best-effort, auto-retries 10x <span>— Vectle</span></a>