Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/clone/services/CloneJobPolling

Cockpit client (features), next. Source: ui/client/features/clone/services/CloneJobPolling.ts.

Functions#

pollCloneJob()#

pollCloneJob(jobId, read, onJob, intervalMs?): () => void

Defined in: ui/client/features/clone/services/CloneJobPolling.ts:9

Follow one clone job: read it every tick and hand each successful read to onJob. A read that lands after the returned stop function ran is dropped.

Parameters#

jobId

string

read

(id) => Promise<CloneReadResult>

onJob

(job) => void

intervalMs?

number = CLONE_JOB_POLL_MS

Returns#

() => void


pollCloneList()#

pollCloneList(list, onJobs, intervalMs?): () => void

Defined in: ui/client/features/clone/services/CloneJobPolling.ts:29

Keep the recent-clones list fresh: one read now, then one per tick; a null list (unreachable) keeps what is shown.

Parameters#

list

() => Promise<CloneJob[] | null>

onJobs

(jobs) => void

intervalMs?

number = CLONE_LIST_POLL_MS

Returns#

() => void