Skip to content

Commit

Permalink
Merge pull request #1712 from DemocracyClub/dont-retry
Browse files Browse the repository at this point in the history
Don't retry failed Lambda schedules
  • Loading branch information
symroe authored Oct 18, 2023
2 parents 4636130 + b1acac6 commit 633021b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sam-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,35 @@ Resources:
Name: import-people-recently-updated
Description: Update all people updated in YNR recently
Input: '{"command": "import_people", "args": ["--recently-updated"]}'
RetryPolicy:
MaximumRetryAttempts: 0
DeleteDeletedPeople:
Type: Schedule # More info about API Event Source: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#schedule
Properties:
Schedule: rate(1 hour)
Name: delete-deleted-people
Description: Deletes people deleted in YNR in the last hour
Input: '{"command": "delete_deleted_people"}'
RetryPolicy:
MaximumRetryAttempts: 0
ImportBallotsRecentlyUpdated:
Type: Schedule # More info about API Event Source: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#schedule
Properties:
Schedule: cron(2-57/5 * ? * * *) # using the ? as you cannot use * wildcard for both day-of-month and day-of-week field. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions
Name: import-ballots-recently-updated
Description: Update all ballots updated in YNR recently
Input: '{"command": "import_ballots", "args": ["--recently-updated"]}'
RetryPolicy:
MaximumRetryAttempts: 0
ImportParties:
Type: Schedule
Properties:
Schedule: rate(1 day)
Name: import-parties
Description: Import parties
Input: '{"command": "import_parties"}'
RetryPolicy:
MaximumRetryAttempts: 0
BatchFeedbackToSlack:
Type: Schedule
Properties:
Expand Down Expand Up @@ -155,6 +163,8 @@ Resources:
Name: import-wikipedia-bios
Description: Import wikipedia bio extracts
Input: '{"command": "import_wikipedia_bios", "args": ["--current"]}'
RetryPolicy:
MaximumRetryAttempts: 0
# ILPGlobal:
# Type: Schedule
# Properties:
Expand Down

0 comments on commit 633021b

Please sign in to comment.