From b488d57287a0798bbfedb43d9d77f251b0eb1357 Mon Sep 17 00:00:00 2001 From: philmcmahon Date: Thu, 9 Jan 2025 17:19:59 +0000 Subject: [PATCH] more logging --- packages/api/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index ef30863a..3a88d562 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -301,7 +301,8 @@ const getApp = async () => { ...item, exportStatus: currentStatuses, }); - const exportPromises: Promise[] = exportRequest.data.items + + const exportPromises: Promise[] = exportRequest.data.items .map((exportType: ExportType) => { if (exportType === 'text' || exportType === 'srt') { return exportTranscriptToDoc( @@ -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; }), ]); @@ -420,7 +423,6 @@ if (runningOnAws) { (app) => (serverlessExpressHandler = serverlessExpress({ app, - resolutionMode: 'CALLBACK', })), );