Skip to content

Commit

Permalink
Merge pull request #255 from aws-samples/fix/job-status-duplicate
Browse files Browse the repository at this point in the history
Disable job status indicator for json input files
  • Loading branch information
kishd authored Mar 29, 2024
2 parents 0c1b376 + e6c60ec commit 4bfc35d
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 4bfc35d

Please sign in to comment.