Function
collectTraces
(pool: Pool, runId: string)
Source from the content-addressed store, hash-verified
| 104 | } |
| 105 | |
| 106 | async function collectTraces(pool: Pool, runId: string): Promise<TraceRow[]> { |
| 107 | const result = await pool.query<TraceRow>( |
| 108 | `SELECT sequence, node_ref, type, timestamp, level, message, error |
| 109 | FROM workflow_traces |
| 110 | WHERE run_id = $1 |
| 111 | ORDER BY sequence ASC`, |
| 112 | [runId], |
| 113 | ); |
| 114 | |
| 115 | return result.rows; |
| 116 | } |
| 117 | |
| 118 | async function main() { |
| 119 | const pool = new Pool({ connectionString: DATABASE_URL }); |
Tested by
no test coverage detected