Skip to content

Commit

Permalink
chore: set timeout longer to handle large ods file number (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
dengmingtong authored May 20, 2024
1 parent 6a08bfd commit 8d806b4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analytics/private/load-ods-data-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@ export class LoadOdsDataToRedshiftWorkflow extends Construct {
'skip-running-workflow.ts',
),
handler: 'handler',
memorySize: 128,
timeout: Duration.minutes(2),
memorySize: 512,
timeout: Duration.minutes(15),
logConf: {
retention: RetentionDays.ONE_WEEK,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,38 @@ describe('DataAnalyticsRedshiftStack lambda function test', () => {
}
});

test('Check lambda CheckSkippingRunningWorkflowFn', () => {
for (const nestedTemplate of allNestedTemplates) {
nestedTemplate.hasResourceProperties('AWS::Lambda::Function', {
Code: {
S3Bucket: Match.anyValue(),
S3Key: Match.anyValue(),
},
Role: {
'Fn::GetAtt': [
Match.anyValue(),
'Arn',
],
},
Environment: {
Variables: {
PROJECT_ID: Match.anyValue(),
DYNAMODB_TABLE_NAME: Match.anyValue(),
DYNAMODB_TABLE_INDEX_NAME: Match.anyValue(),
},
},
Handler: 'index.handler',
MemorySize: 512,
ReservedConcurrentExecutions: 1,
Runtime: Match.anyValue(),
Timeout: 900,
LoggingConfig: {
ApplicationLogLevel: 'WARN',
LogFormat: 'JSON',
},
});
}
});

test('Check LoadODSEventToRedshiftWorkflowODSEventProcessorFn', () => {
for (const nestedTemplate of allNestedTemplates) {
Expand Down

0 comments on commit 8d806b4

Please sign in to comment.