Skip to content

CaptureAttemptModel

Defined in: packages/core/src/models/capture-attempt.ts:18

Data operations for capture attempts (one row per build run).

new CaptureAttemptModel(db, tables?): CaptureAttemptModel

Defined in: packages/core/src/models/capture-attempt.ts:22

DatabaseAdapter

CaptureAttemptTables

CaptureAttemptModel

closeOthers(buildId, keepId, reason): Promise<number>

Defined in: packages/core/src/models/capture-attempt.ts:121

Close every attempt of a build still queued or running other than keepId, as cancelled with reason: a new plan of the build supersedes them, and nothing else would ever close them.

string

string | null

string

Promise<number>


getByNo(buildId, attemptNo): Promise<CaptureAttempt | null>

Defined in: packages/core/src/models/capture-attempt.ts:34

string

number

Promise<CaptureAttempt | null>


listByBuild(buildId): Promise<CaptureAttempt[]>

Defined in: packages/core/src/models/capture-attempt.ts:27

string

Promise<CaptureAttempt[]>


markFinished(id, status, error?, counts?): Promise<CaptureAttempt>

Defined in: packages/core/src/models/capture-attempt.ts:84

string

"completed" | "failed" | "cancelled"

string

number

number

Promise<CaptureAttempt>


markRunning(id): Promise<CaptureAttempt>

Defined in: packages/core/src/models/capture-attempt.ts:71

string

Promise<CaptureAttempt>


startAttempt(projectId, buildId, reqId?): Promise<CaptureAttempt>

Defined in: packages/core/src/models/capture-attempt.ts:44

string

string

string

Promise<CaptureAttempt>