( publisher: StreamWriter, runId: string, requestId: string )
| 162 | } |
| 163 | |
| 164 | async function handleSuccess( |
| 165 | publisher: StreamWriter, |
| 166 | runId: string, |
| 167 | requestId: string |
| 168 | ): Promise<void> { |
| 169 | if (!publisher.sawComplete) { |
| 170 | await publisher.publish({ |
| 171 | type: MothershipStreamV1EventType.complete, |
| 172 | payload: { status: MothershipStreamV1CompletionStatus.complete }, |
| 173 | }) |
| 174 | } |
| 175 | await publisher.flush() |
| 176 | await loggedRunStatusUpdate(runId, MothershipStreamV1CompletionStatus.complete, requestId, { |
| 177 | completedAt: new Date(), |
| 178 | }) |
| 179 | } |
| 180 | |
| 181 | async function loggedRunStatusUpdate( |
| 182 | runId: string, |
no test coverage detected