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

Fix QueueGranules timeouts #318

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _templates/rule/new/rule.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ message: >
"ingestedPathFormat": "<%- ingestedPathFormat %>",
"startDate": "<%= startYear %>-01-01T00:00:00Z",
"endDate": "<%= parseInt(endYear) + 1 %>-01-01T00:00:00Z",
"step": "P1D"
"step": "P1D",
"maxBatchSize": 200,
}
}
4 changes: 2 additions & 2 deletions app/stacks/cumulus/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ resource "aws_cloudwatch_event_target" "background_job_queue_watcher" {
arn = module.cumulus.sqs2sfThrottle_lambda_function_arn
input = jsonencode(
{
messageLimit = 500
messageLimit = 1500
queueUrl = aws_sqs_queue.background_job_queue.id
timeLimit = 60
}
Expand Down Expand Up @@ -576,7 +576,7 @@ module "cumulus" {
{
id = "backgroundJobQueue",
url = aws_sqs_queue.background_job_queue.id,
execution_limit = 300
execution_limit = 500
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"TargetPath": "$.payload"
},
"task_config": {
"concurrency": 1,
"queueUrl": "${background_job_queue_url}",
"preferredQueueBatchSize": "{$.meta.collection.meta.preferredQueueBatchSize}",
"provider": "{$.meta.provider}",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ type BucketKey = {
readonly key: string;
};

// Default maximum batch size for batching granules after discovery is 1000, but this
// Default maximum batch size for batching granules after discovery is 200, but this
// can be set on a per rule basis by setting `meta.maxBatchSize` in a rule definition.
export const BatchGranulesInput = t.readonly(
t.type({
config: t.type({
providerPath: t.string,
maxBatchSize: tt.fromNullable(t.number, 1000),
maxBatchSize: tt.fromNullable(t.number, 200),
}),
input: DiscoverGranulesOutput,
})
Expand Down
Loading