Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Jan 9, 2025
1 parent a956f71 commit b488d57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ const getApp = async () => {
...item,
exportStatus: currentStatuses,
});
const exportPromises: Promise<void>[] = exportRequest.data.items

const exportPromises: Promise<ExportStatus>[] = exportRequest.data.items
.map((exportType: ExportType) => {
if (exportType === 'text' || exportType === 'srt') {
return exportTranscriptToDoc(
Expand Down Expand Up @@ -338,7 +339,9 @@ const getApp = async () => {
}),
);
res.send(JSON.stringify(currentStatuses));
logger.info('Sent response to client, waiting for export to complete...');
await Promise.all(exportPromises);
logger.info('All exports complete');
return;
}),
]);
Expand Down Expand Up @@ -420,7 +423,6 @@ if (runningOnAws) {
(app) =>
(serverlessExpressHandler = serverlessExpress({
app,
resolutionMode: 'CALLBACK',
})),
);

Expand Down

0 comments on commit b488d57

Please sign in to comment.