Skip to content

Commit

Permalink
Changed maintainer dashboard lambda to run at the start of UTC day (#102
Browse files Browse the repository at this point in the history
)

Signed-off-by: Brandon Shien <[email protected]>
  • Loading branch information
bshien authored Nov 9, 2024
1 parent 666b44a commit dbc4a1b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion infrastructure/lib/stacks/maintainerInactivityWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class OpenSearchMaintainerInactivityWorkflowStack extends Stack {
})

new Rule(this, 'MaintainerInactivityWorkflow-Every-Day', {
schedule: Schedule.expression('cron(15 0 * * ? *)'),
schedule: Schedule.expression('cron(0 0 * * ? *)'),
targets: [new SfnStateMachine(opensearchMaintainerInactivityWorkflow)],
});

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/lib/stacks/s3EventIndexWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class OpenSearchS3EventIndexWorkflowStack extends Stack {
})

const rule = new Rule(this, 'OpenSearchS3EventIndexWorkflow-Every-Day', {
schedule: Schedule.expression('cron(0 0 * * ? *)'),
schedule: Schedule.expression('cron(45 23 * * ? *)'),
});

rule.addTarget(new SfnStateMachine(opensearchS3EventIndexWorkflow, {
Expand Down
18 changes: 18 additions & 0 deletions infrastructure/test/maintainer-inactivity-workflow-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,22 @@ test('Maintainer Inactivity Workflow Stack Test', () => {
},
"StateMachineName": "OpenSearchMaintainerInactivityWorkflow"
});
template.hasResourceProperties('AWS::Events::Rule', {
"ScheduleExpression": "cron(0 0 * * ? *)",
"State": "ENABLED",
"Targets": [
{
"Arn": {
"Ref": "OpenSearchMaintainerInactivityWorkflowE07E380B"
},
"Id": "Target0",
"RoleArn": {
"Fn::GetAtt": [
"OpenSearchMaintainerInactivityWorkflowEventsRole0FDEAE61",
"Arn"
]
}
}
]
});
});
2 changes: 1 addition & 1 deletion infrastructure/test/s3-event-index-workflow-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test('S3 Event Index Workflow Stack Test', () => {
});
template.resourceCountIs('AWS::Events::Rule', 1);
template.hasResourceProperties('AWS::Events::Rule', {
"ScheduleExpression": "cron(0 0 * * ? *)",
"ScheduleExpression": "cron(45 23 * * ? *)",
"State": "ENABLED",
"Targets": [
{
Expand Down

0 comments on commit dbc4a1b

Please sign in to comment.