Skip to main content

Class: MemoryRunIndex

Defined in: packages/core/src/runtime/run-index.ts:44

An in-memory RunIndex, for tests and as a reference implementation. It lives as long as its process, so it cannot find a run after a restart.

Recording a reference again (a resume) makes it active again and keeps the first startedAt. A heartbeat or settlement for a reference that was never recorded changes nothing. A heartbeat never moves backwards.

Implements​

Constructors​

Constructor​

new MemoryRunIndex(): MemoryRunIndex

Returns​

MemoryRunIndex

Methods​

heartbeat()​

heartbeat(reference, at): Promise<void>

Defined in: packages/core/src/runtime/run-index.ts:62

Parameters​

reference​

ExecutionReference

at​

number

Returns​

Promise<void>

Implementation of​

RunIndex.heartbeat


listActive()​

listActive(options): Promise<ExecutionReference[]>

Defined in: packages/core/src/runtime/run-index.ts:74

Runs whose latest inspection is pending and whose heartbeat is older than quietFor.

Parameters​

options​
limit?​

number

now?​

number

quietFor​

number

Returns​

Promise<ExecutionReference[]>

Implementation of​

RunIndex.listActive


record()​

record(entry): Promise<void>

Defined in: packages/core/src/runtime/run-index.ts:47

Parameters​

entry​

RunIndexEntry

Returns​

Promise<void>

Implementation of​

RunIndex.record


settle()​

settle(reference, inspection): Promise<void>

Defined in: packages/core/src/runtime/run-index.ts:68

Parameters​

reference​

ExecutionReference

inspection​

ExecutionInspection

Returns​

Promise<void>

Implementation of​

RunIndex.settle