Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Daily deletion of stale trace locations and CheckIns (EXPOSUREAPP-5748, EXPOSUREAPP-5764) #2656

Conversation

LukasLechnerDev
Copy link
Contributor

@LukasLechnerDev LukasLechnerDev commented Mar 19, 2021

This PR starts a periodic worker (runs daily) at app start that deletes all TraceLocations and CheckIns in the database that have an endDate that is older than 15 days.

The approach here is different than the deletion of Items in the Contact Journal.
In the Contact Journal:

  • old items are also deleted daily by a worker
  • but items are also deleted whenever the user enters the Contact Journal

We decided not to delete trace locations and check-ins whenever the user enters the corresponding screen, as we then would need to wait until the deletion is completed before we can show the items to the user, which makes the code more complex and harms the performance. Instead, the TraceLocation/CheckIn Screen needs to filter the TraceLocations / CheckIns from the repository and only show ones with an endDate < 15 days. This will be done in another PR.

@LukasLechnerDev LukasLechnerDev requested a review from a team March 19, 2021 16:26
@chiljamgossow chiljamgossow self-assigned this Mar 22, 2021
@harambasicluka harambasicluka added the maintainers Tag pull requests created by maintainers label Mar 22, 2021
@harambasicluka harambasicluka added this to the 2.0.0 milestone Mar 22, 2021
@LukasLechnerDev LukasLechnerDev changed the title Daily deletion of stale trace locations (EXPOSUREAPP-5748) Daily deletion of stale trace locations and CheckIns (EXPOSUREAPP-5748, EXPOSUREAPP-5764) Mar 23, 2021
@d4rken d4rken self-assigned this Mar 26, 2021
@d4rken d4rken self-requested a review March 26, 2021 14:19
@mtwalli mtwalli self-assigned this Mar 29, 2021
@d4rken d4rken removed their assignment Mar 29, 2021
@d4rken d4rken removed their request for review March 29, 2021 05:34
Copy link
Contributor

@mtwalli mtwalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

74.6% 74.6% Coverage
0.0% 0.0% Duplication

@LukasLechnerDev LukasLechnerDev merged commit 7994e81 into release/2.0.x Mar 30, 2021
@LukasLechnerDev LukasLechnerDev deleted the feature/5748-Automatic-Deletion-of-TraceLocations-and-CheckIns branch March 30, 2021 08:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants