job_types.ts

view source

Declarations
#

4 declarations

is_job_finished
#

job_types.ts view source

(status: "failed" | "queued" | "running" | "succeeded" | "cancelled"): boolean import {is_job_finished} from '@fuzdev/zzz/job_types.js';

Whether a job in status is over.

status

returns

boolean

JobKind
#

job_types.ts view source

value + type

"transcription" import {JobKind} from '@fuzdev/zzz/job_types.js';

What a job does.

JobSnapshot
#

job_types.ts view source

value + type

{ job_id: string & $brand<"Uuid">; kind: "transcription"; status: "failed" | "queued" | "running" | "succeeded" | "cancelled"; progress: number | null; input_path: string & $brand<...>; ... 6 more ...; stderr: string; } import {JobSnapshot} from '@fuzdev/zzz/job_types.js';

A job as the backend reports it: long-running work on a file that outlives the request that started it. Twin of the backend's JobSnapshot.

job_id

type string & $brand<"Uuid">

kind

type "transcription"

status

type "failed" | "queued" | "running" | "succeeded" | "cancelled"

progress

How far along a running job is, 0 to 1 — null when unknown.

type number | null

input_path

The file the job works on.

type string & $brand<"DiskfilePath">

output_path

The file the job wrote, once it succeeded.

type (string & $brand<"DiskfilePath">) | null

commands

The command lines run so far, in order, for display.

type string[]

queued_at

Milliseconds since the epoch.

type number

started_at

type number | null

ended_at

type number | null

error

Why a failed job failed.

type string | null

stderr

The tail of the failing tool's stderr — derived from the input file, so render it as text.

type string

JobStatus
#

job_types.ts view source

value + type

"failed" | "queued" | "running" | "succeeded" | "cancelled"

type "failed" | "queued" | "running" | "succeeded" | "cancelled"

import {JobStatus} from '@fuzdev/zzz/job_types.js';

Where a job is in its life. The last three are final.

Depends on
#

Imported by
#