@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 ​
readonlyalgorithm:AlgorithmKey
Defined in: graphty-element/src/session/runs/Run.ts:140
Which algorithm to run.
exact ​
readonlyexact: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 ​
readonlyparams:Readonly<Record<string,unknown>>
Defined in: graphty-element/src/session/runs/Run.ts:142
Its parameters, canonicalised.
runId ​
readonlyrunId:string
Defined in: graphty-element/src/session/runs/Run.ts:138
The run this work belongs to.
sample ​
readonlysample:number|null
Defined in: graphty-element/src/session/runs/Run.ts:150
The sample size the caller asked for, or null.
scope ​
readonlyscope: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 ​
readonlyseed:number|null
Defined in: graphty-element/src/session/runs/Run.ts:146
The seed a randomised or sampled method should use, or null.
signal ​
readonlysignal: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 ​
readonlytimeBox: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 ​
readonlytimeBoxMs: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 ​
What changed.
Returns ​
void