(
auth?: AuthContext | null,
options: {
workflowId?: string;
status?: ExecutionStatus;
limit?: number;
} = {},
)
| 636 | } |
| 637 | |
| 638 | async listRuns( |
| 639 | auth?: AuthContext | null, |
| 640 | options: { |
| 641 | workflowId?: string; |
| 642 | status?: ExecutionStatus; |
| 643 | limit?: number; |
| 644 | } = {}, |
| 645 | ) { |
| 646 | const organizationId = this.requireOrganizationId(auth); |
| 647 | const runs = await this.runRepository.list({ |
| 648 | ...options, |
| 649 | organizationId, |
| 650 | }); |
| 651 | const summaries = await Promise.all( |
| 652 | runs.map((run) => this.buildRunSummary(run, organizationId)), |
| 653 | ); |
| 654 | |
| 655 | summaries.sort((a, b) => new Date(b.startTime).getTime() - new Date(a.startTime).getTime()); |
| 656 | this.logger.log(`Loaded ${summaries.length} workflow run(s) for timeline`); |
| 657 | return { runs: summaries }; |
| 658 | } |
| 659 | |
| 660 | async listChildRuns( |
| 661 | parentRunId: string, |
no test coverage detected