-
Notifications
You must be signed in to change notification settings - Fork 8
feat: delete older archived notifications #448
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
Open
kshitij-k-osmosys
wants to merge
10
commits into
main
Choose a base branch
from
feat/delete-old-archived-notifications
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1c3cc15
feat: soft delete archived notifications older than env defined timep…
kshitij-k-osmosys 384a024
style: update comment
kshitij-k-osmosys 4fb4e0e
feat: add check for negative entries
kshitij-k-osmosys 958eeb1
feat: error handling around backup directory creation
kshitij-k-osmosys fecaac2
feat: hard delete archived notifications
kshitij-k-osmosys 5eea299
Merge branch 'main' into feat/delete-old-archived-notifications
kshitij-k-osmosys 38bf95d
fix: commit transaction before releasing
kshitij-k-osmosys 447842d
feat: limit number of notifications deleted to 500
kshitij-k-osmosys afa1f32
style: set unit of time as suffix for env variables
kshitij-k-osmosys 270b980
feat: delete the csv file if transaction fails
kshitij-k-osmosys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not a good idea to hold a lot of records here. This will consume a lot of RAM if we do it on OQSHA database where we have lakhs lakhs of records.
We need to do this process in a pagination way. If we simply fetch all records at once it will consume a lot of RAM to load the data. We need to do in pagination fashion how we do it in portal cannot pull so much data at once.
You need to also write to the excel or csv in a streaming fashion by not holding a lot of data in memory to dump in csv.
Just assume if there are 30 lakh records. 3 milion then we will consume a lot of RAM and also the query might timeout.
Kindly make sure
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.
Limit number of deleted entries to 500 447842d
Delete the csv file if transaction fails 270b980