Skip to content

Commit

Permalink
disabled the augmentation scheduler since DataCite has been throwing …
Browse files Browse the repository at this point in the history
…errors and our approach isn't really sustainable atm
  • Loading branch information
briri committed Nov 20, 2023
1 parent b8573ae commit 86b1195
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/sam/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ Resources:
RetryPolicy:
MaximumEventAgeInSeconds: 180
MaximumRetryAttempts: 3
State: 'ENABLED' # 'DISABLED'
State: 'ENABLED'

AugmentationSchedulerPermission:
Type: 'AWS::Lambda::Permission'
Expand All @@ -1352,22 +1352,22 @@ Resources:

# Scheduled events
# See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression
AugmentationSchedulerDaily:
Type: 'AWS::Events::Rule'
Properties:
# AWS CRON expressions have some nuances: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html
ScheduleExpression: 'cron(0 0 ? * * *)' # Every night at midnight
Targets:
- Id: !Ref AugmentationSchedulerFunction
Arn: !GetAtt AugmentationSchedulerFunction.Arn
# AugmentationSchedulerDaily:
# Type: 'AWS::Events::Rule'
# Properties:
# # AWS CRON expressions have some nuances: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html
# ScheduleExpression: 'cron(0 0 ? * * *)' # Every night at midnight
# Targets:
# - Id: !Ref AugmentationSchedulerFunction
# Arn: !GetAtt AugmentationSchedulerFunction.Arn

AugmentationSchedulerDailyPermission:
Type: 'AWS::Lambda::Permission'
Properties:
FunctionName: !GetAtt AugmentationSchedulerFunction.Arn
Action: 'lambda:InvokeFunction'
Principal: 'events.amazonaws.com'
SourceArn: !GetAtt AugmentationSchedulerDaily.Arn
# AugmentationSchedulerDailyPermission:
# Type: 'AWS::Lambda::Permission'
# Properties:
# FunctionName: !GetAtt AugmentationSchedulerFunction.Arn
# Action: 'lambda:InvokeFunction'
# Principal: 'events.amazonaws.com'
# SourceArn: !GetAtt AugmentationSchedulerDaily.Arn

# Scheduled events to keep some of the API lambdas warm
# See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression
Expand Down

0 comments on commit 86b1195

Please sign in to comment.