-
Notifications
You must be signed in to change notification settings - Fork 0
feat(dev): added m2m events ttl cleaner cronjob (PIN-8266) #409
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
Conversation
Co-authored-by: Michele De Simone <[email protected]>
Co-authored-by: Paolo Manca <[email protected]>
…l-delegation-events
Co-authored-by: Michele De Simone <[email protected]>
…l-delegation-events
| tag: "15-alpine" | ||
|
|
||
| command: ["/bin/sh", "-c"] | ||
| args: |
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.
my suggestion on using directly the postgres image was based on the assumption that the command would have been much easier (basically just the delete).
I appreciate your implementation, with consistent logging and almost zero maintenance for new tables (just be careful because the presence of a column is not a strong discriminator).
On the other side, bash syntax is quite difficult to maintain when parsed as string, and errors in the script may be found only at runtime.
If you prefer having this logic I suggest considering writing a node application instead.
|
Closed in favor of #439 |
Issue
Contesto / Perché
This PR adds anew cronjob
m2m-events-ttl-cleanerwith a psql script that removes old records from M2M event tables based on a configurable TTL (Time To Live) retention policy.It automatically finds tables with
event_timestampcolumn, skipping the ones who don't.Added new
${NAMESPACE}_m2m_event_ttl_cleaner_useruser withDELETEgrant for all m2m events tables.PSQL script tested locally.
Servizi / Scope impattati
devChecklist Tracciabilità