fabric/graph/job
Read-only observation of an independently owned external job. A receipt comes from an earlier submission; this binding never submits or cancels it.
Types
A stop request’s progress is independent of the remote job’s outcome.
pub type CancellationProgress {
RequestQueued
RequestStarted
RequestAccepted
RequestRefused(reason: String)
RequestUncertain(evidence: String)
}
Constructors
-
RequestQueued -
RequestStarted -
RequestAccepted -
RequestRefused(reason: String) -
RequestUncertain(evidence: String)
pub type Polling {
Manual
Every(milliseconds: Int)
}
Constructors
-
Manual -
Every(milliseconds: Int)
pub type Progress(output) {
Pending
Completed(output)
Failed(reason: String)
Cancelled
}
Constructors
-
Pending -
Completed(output) -
Failed(reason: String) -
CancelledThe service confirms that cancellation has settled.
pub type Reference {
Reference(
run: run.RunId,
activation: Int,
attempt: Int,
operation: run.DefinitionId,
)
}
Constructors
-
Reference( run: run.RunId, activation: Int, attempt: Int, operation: run.DefinitionId, )
Values
pub fn observe(
identity: run.DefinitionId,
receipt: codec.Codec(receipt),
output: codec.Codec(output),
read: fn(context, receipt) -> Result(Progress(output), String),
) -> @internal Observer(
context,
receipt,
output,
Polling,
Progress(String),
)
The callback must be a repeatable read. An error means no authoritative
observation; Failed means the remote job has a definite failure outcome.
Canceling this observation leaves the remote job independently owned.
pub fn with_poll_interval(
observer: @internal Observer(
context,
receipt,
output,
Polling,
Progress(String),
),
every: duration.Duration,
) -> @internal Observer(
context,
receipt,
output,
Polling,
Progress(String),
)
Opt into automatic observation by a registered sweeper on a leased store.
The first observation is immediately eligible; later ready claims wait at
least this interval according to the backend’s clock. Manual polling remains
available. Changing this interval changes the persisted operation contract,
which keeps it in whole milliseconds (Every). definition.build
refuses an interval under 1 ms or over 2^32 - 1 ms
(operation.InvalidLimit(PollInterval, ..)).