Skip to content

Commit

Permalink
Use different ID for translation and transcript
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Jan 28, 2025
1 parent 6a89e7b commit 774d036
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/backend-common/src/sqs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ export const generateOutputSignedUrlAndSendMessage = async (
translationRequested,
);

const jobId = translationRequested ? `${s3Key}-translation` : s3Key;
const job: TranscriptionJob = {
id: jobId, // id of the source file
id: s3Key, // id of the source file
inputSignedUrl,
sentTimestamp: new Date().toISOString(),
userEmail,
Expand All @@ -105,7 +104,7 @@ export const generateOutputSignedUrlAndSendMessage = async (
return await sendMessage(
client,
queueUrl,
JSON.stringify({ ...job, translate: true }),
JSON.stringify({ ...job, id: `${s3Key}-translation`, translate: true }),
s3Key,
);
}
Expand Down

0 comments on commit 774d036

Please sign in to comment.