(runId: string)
| 203 | } |
| 204 | |
| 205 | async getRun(runId: string): Promise<WorkflowRunRecord> { |
| 206 | // UI polling must not wait behind the writer lock; while a mutation is in progress, |
| 207 | // fall back to the last atomic run.json snapshot instead of reading half-updated journals. |
| 208 | if (await this.hasActiveWorkflowMutationLock(runId)) { |
| 209 | return await this.getRunFileSnapshot(runId); |
| 210 | } |
| 211 | return await this.getRunUnlocked(runId); |
| 212 | } |
| 213 | |
| 214 | async getRunStatusSnapshot(runId: string): Promise<WorkflowRunStatusSnapshot> { |
| 215 | assertValidWorkflowRunId(runId); |
no test coverage detected