Skip to content

Jobs

The demo job-lifecycle simulator. The sample's long-ops (generate_srt / transcribe / convert / fix_srt) are submitted for real by the reused UI, so this advances a submitted job queued -> running -> succeeded over a few of TaskContext's 2000 ms polls and attaches the canned result.

Functions

handleJobs()

function handleJobs(method, url, body?): unknown;

Defined in: src/demo/api/jobs.ts:101

Handles a /jobs request, returning the response value apiFetch would give (a job, a list, or undefined for a 204 delete).

Parameters

Parameter Type
method string
url string
body? unknown

Returns

unknown