Skip to content
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

Temporary session storage cleanup job #1100

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Temporary session storage cleanup job #1100

merged 5 commits into from
Jun 18, 2024

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Jun 13, 2024

https://eaflood.atlassian.net/browse/WATER-4281

As part of the work on returns, we have had to build in support for temporary session storage into the water-abstraction-system. This is what allows us to track data across pages as part of a journey until it’s ready to be properly persisted.

When a user gets to the end of their journey they can explicitly complete or cancel it. Either way, we’ll delete our temporary session record when they do this. But if they abandon the journey without doing this we’ll be left with the temporary record. Over time this would build up and affect the performance of any pages that use this temporary storage.

This PR will create a job that can be triggered through an API call that deletes any record in sessions where the created on date is more than 24 hours ago.

https://eaflood.atlassian.net/browse/WATER-4281

As part of the work on returns, we have had to build in support for temporary session storage into the water-abstraction-system. This is what allows us to track data across pages as part of a journey until it’s ready to be properly persisted.

When a user gets to the end of their journey they can explicitly complete or cancel it. Either way, we’ll delete our temporary session record when they do this. But if they abandon the journey without doing this we’ll be left with the temporary record. Over time this would build up and affect the performance of any pages that use this temporary storage.

This PR will create a job that can be triggered through an API call that deletes any record in sessions where the created on date is more than 24 hours ago.
@Jozzey Jozzey added the enhancement New feature or request label Jun 13, 2024
@Jozzey Jozzey self-assigned this Jun 13, 2024
@Jozzey Jozzey marked this pull request as ready for review June 17, 2024 15:04
@Jozzey Jozzey requested a review from Cruikshanks June 17, 2024 15:04
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

@Jozzey Jozzey merged commit fb8b164 into main Jun 18, 2024
6 checks passed
@Jozzey Jozzey deleted the session-cleanup-job branch June 18, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants