Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lambda-tiler): Add file number limitation to import api. #2203

Merged
merged 3 commits into from
May 17, 2022

Conversation

Wentao-Kuang
Copy link
Contributor

No description provided.

@Wentao-Kuang Wentao-Kuang requested a review from a team as a code owner May 17, 2022 21:32
@@ -217,11 +217,9 @@ export class CogStacJob implements CogJob {
bounds: metadata.targetBounds,
oneCogCovering: ctx.oneCogCovering,
},
processingId: ctx.override?.processingId,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix a problem for passing processingId to job.json. Otherwise, I need to set it as job.json.processingId = ctx.override?.processingId;

@@ -44,6 +44,7 @@ export async function Import(req: LambdaHttpRequest): Promise<LambdaHttpResponse
if (role == null) return new LambdaHttpResponse(403, 'Unable to Access the s3 bucket');
const files = await findImagery(path);
if (files.length === 0) return new LambdaHttpResponse(404, 'Imagery Not Found');
if (files.length >= 500) return new LambdaHttpResponse(400, `Too many files to process. Files: ${files.length}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this limit would be way too low, maybe 5_000 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Updated.

@kodiakhq kodiakhq bot merged commit 4694e29 into master May 17, 2022
@kodiakhq kodiakhq bot deleted the feat/limit-file-number branch May 17, 2022 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants