Skip to content

@graphty/graphty-element / session / RunExecutionContext

Interface: RunExecutionContext ​

Defined in: graphty-element/src/session/runs/Run.ts:136

What the thing doing the work is given.

signal and timeBox are two different instructions and must not be folded together. An aborted signal means stop and throw; an aborted timeBox means stop and RETURN what you have, so the run can publish a partial result instead of a failure.

Properties ​

algorithm ​

readonly algorithm: AlgorithmKey

Defined in: graphty-element/src/session/runs/Run.ts:140

Which algorithm to run.


exact ​

readonly exact: boolean | null

Defined in: graphty-element/src/session/runs/Run.ts:148

Whether the caller refused approximation, or null when it did not say.


params ​

readonly params: Readonly<Record<string, unknown>>

Defined in: graphty-element/src/session/runs/Run.ts:142

Its parameters, canonicalised.


runId ​

readonly runId: string

Defined in: graphty-element/src/session/runs/Run.ts:138

The run this work belongs to.


sample ​

readonly sample: number | null

Defined in: graphty-element/src/session/runs/Run.ts:150

The sample size the caller asked for, or null.


scope ​

readonly scope: ResolvedScope

Defined in: graphty-element/src/session/runs/Run.ts:144

What it may look at, resolved against the graph as it stands now.


seed ​

readonly seed: number | null

Defined in: graphty-element/src/session/runs/Run.ts:146

The seed a randomised or sampled method should use, or null.


signal ​

readonly signal: AbortSignal

Defined in: graphty-element/src/session/runs/Run.ts:154

Aborted when the run is cancelled. Throw from here; do not swallow it.


timeBox ​

readonly timeBox: AbortSignal | null

Defined in: graphty-element/src/session/runs/Run.ts:156

Aborted when the time box expires. Stop and return what has been computed.


timeBoxMs ​

readonly timeBoxMs: number | null

Defined in: graphty-element/src/session/runs/Run.ts:152

The time box in milliseconds, or null when the run is not boxed.

Methods ​

report() ​

report(progress): void

Defined in: graphty-element/src/session/runs/Run.ts:161

Report how far along the work is.

Parameters ​

progress ​

RunProgressReport

What changed.

Returns ​

void