-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cleanup Lambda: add scheduled cleanup lambda #123
Conversation
b43d481
to
98d7354
Compare
98d7354
to
e434cdf
Compare
architecture: LAMBDA_ARCHITECTURE, | ||
handler: 'handler.main', | ||
fileName: 'cleanup-lambda.zip', | ||
timeout: Duration.millis(45000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for this timeout? My instinct is to go for a longer timeout as it's a batch job.. Have we done any tests to see how long it would usually take to complete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't done any test yet; the 45s timeout is just a place holder while waiting to figure a better value for it.
|
||
console.log(`Deleted ${result.count} records`); | ||
} catch (error) { | ||
console.error('Error deleting old records:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might we want to fail the job in this case, so that we can add retry behaviour? (this could wait for a separate PR though)
eb65cc8
to
2d57399
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
2d57399
to
36743d1
Compare
What does this change?
Add a scheduled cleanup lambda to delete stories older than 2 weeks.
Scheduled to run every day at 5am.
How to test
How can we measure success?
Have we considered potential risks?
Images
Accessibility