Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
farski committed Jan 9, 2024
1 parent 6e8afc3 commit 6151f15
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/extraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export async function run(extractionType, config) {
console.log(
JSON.stringify({
QueryJob: { Type: extractionType, Metadata: queryJob.metadata },
})
}),
);

const queryMetadata = await new Promise((resolve, reject) => {
Expand Down Expand Up @@ -157,7 +157,7 @@ export async function run(extractionType, config) {
console.log(
JSON.stringify({
ExtractJob: { Type: extractionType, Metadata: extractJob.metadata },
})
}),
);

const copyMachines = [];
Expand All @@ -173,7 +173,7 @@ export async function run(extractionType, config) {
// that was created in GCS.
const numberedObjectName = objectName.replace(
`-*${fileExtension}`,
`-${fileSequenceId}${fileExtension}`
`-${fileSequenceId}${fileExtension}`,
);

// Copy that specific numbered file
Expand All @@ -183,8 +183,8 @@ export async function run(extractionType, config) {
config,
bucketName,
numberedObjectName,
fileSequenceId
)
fileSequenceId,
),
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const handler = async (event, context) => {
JSON.stringify({
Extractions: extractions,
Range: [inclusiveRangeStart, exclusiveRangeEnd],
})
}),
);

// A prefix defined on the input, which should include a trailing slash if
Expand Down
14 changes: 7 additions & 7 deletions src/make_copies.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function makeCopies(
config,
sourceBucketName,
sourceObjectName,
fileSequenceId
fileSequenceId,
) {
if (config.copies?.length) {
const credentials = config.bigQueryClient.authClient.jsonContent;
Expand Down Expand Up @@ -63,19 +63,19 @@ export default async function makeCopies(
// Replace each format directive
.replace(
/%RANGE_START_ISO/g,
config.inclusiveRangeStart.toISOString()
config.inclusiveRangeStart.toISOString(),
)
.replace(
/%RANGE_START_DATE_ISO/g,
config.inclusiveRangeStart.toISOString().split("T")[0]
config.inclusiveRangeStart.toISOString().split("T")[0],
)
.replace(
/%RANGE_END_ISO/g,
config.exclusiveRangeEnd.toISOString()
config.exclusiveRangeEnd.toISOString(),
)
.replace(
/%RANGE_END_DATE_ISO/g,
config.exclusiveRangeEnd.toISOString().split("T")[0]
config.exclusiveRangeEnd.toISOString().split("T")[0],
)
.replace(/%TYPE/g, extractionType)
.replace(/%REQUEST_ID/g, config.requestId)
Expand All @@ -90,7 +90,7 @@ export default async function makeCopies(
Source: `gs://${sourceBucketName}/${sourceObjectName}`,
Destination: `s3://${c.BucketName}/${destinationKey}`,
},
})
}),
);

return {
Expand All @@ -114,7 +114,7 @@ export default async function makeCopies(
new PublishCommand({
Message: JSON.stringify(job),
TopicArn: process.env.PORTER_SNS_TOPIC,
})
}),
);
}
}

0 comments on commit 6151f15

Please sign in to comment.