(runId: string)
| 182 | } |
| 183 | |
| 184 | async function waitForRunToExecute(runId: string) { |
| 185 | let run = await runs.retrieve(runId); |
| 186 | |
| 187 | while (!run.isExecuting) { |
| 188 | console.log("run is not executing, waiting...", run); |
| 189 | await new Promise((resolve) => setTimeout(resolve, 2000)); |
| 190 | run = await runs.retrieve(runId); |
| 191 | } |
| 192 | |
| 193 | console.log("run is executing", run); |
| 194 | |
| 195 | return run; |
| 196 | } |
| 197 | |
| 198 | async function doSchedules() { |
| 199 | const allSchedules = await schedules.list(); |