Skip to content

Commit

Permalink
Disable job status indicator for json input files
Browse files Browse the repository at this point in the history
  • Loading branch information
kishd committed Mar 29, 2024
1 parent acabaaf commit e6c60ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pca-ui/src/lambda/input_bucket_trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ exports.handler = async function (event, context) {
console.log(input);
const jobName = getJobNameFromKey(input.key);
const outputFileName = getFilenameFromKey(input.key);
const extension = getExtensionFromKey(input.key);

// The Done/Success state corresponds to when pca-aws-sf-post-processing function
// completes successfully. It writes the final results to the output (results) S3 bucket.
Expand All @@ -124,7 +125,7 @@ exports.handler = async function (event, context) {
// to be written to the DynamoDB table. Handle updating the status to Done in the output
// S3 bucket trigger.

if (outputState !== "Done") {
if (outputState !== "Done" && extension !== "json") {
const promise = createRecord(outputFileName, jobName, outputState);
return await Promise.all([promise]);
}
Expand Down

0 comments on commit e6c60ec

Please sign in to comment.