RAS-1878 Scheduled job to delete conversations marked for deletion#468
Open
RAS-1878 Scheduled job to delete conversations marked for deletion#468
Conversation
LJBabbage
commented
Apr 24, 2026
| closedConversationsMarkForDeletionScheduler: | ||
| name: sm-closed-conversations-mark-for-deletion | ||
| cron: "0 0 * * *" | ||
| cron: "0 1 * * *" |
Contributor
Author
There was a problem hiding this comment.
Marked for deleted at 01:00 and then deleted 23 hours later at 00:00
LJBabbage
commented
Apr 24, 2026
| - /bin/sh | ||
| - -c | ||
| - curl -s -u $(SECURITY_USER_NAME):$(SECURITY_USER_PASSWORD) -X POST http://$(SECURE_MESSAGE_SERVICE_HOST):$(SECURE_MESSAGE_SERVICE_PORT)/$(TARGET) | ||
| - curl -s -u $(SECURITY_USER_NAME):$(SECURITY_USER_PASSWORD) -X POST http://$(SECURE_MESSAGE_SERVICE_HOST):$(SECURE_MESSAGE_SERVICE_PORT)$(TARGET) |
Contributor
Author
There was a problem hiding this comment.
Noticed the double "/" as the value file already has it
LJBabbage
commented
Apr 24, 2026
| return "", 500 | ||
|
|
||
|
|
||
| class ThreadDeletion(Resource): |
Contributor
Author
There was a problem hiding this comment.
At some stage this thread/conversation muddle needs correcting, but continued it for now
LJBabbage
commented
Apr 24, 2026
| and "health" not in request.endpoint | ||
| and request.endpoint != "info" | ||
| and request.endpoint != "threadmarkfordeletion" | ||
| and request.endpoint != "threaddeletion" |
Contributor
Author
There was a problem hiding this comment.
As agreed in tech, this doesn't need JWT
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What and why?
Creates an end point and endpoint to delete conversations (and related secure messages/statuses) that have been marke_for_deletion
How to test?
Deploy this branch and helm chart (-p Deploy Version and Helm Chart ) then create a number of secure messages and responses, with at least one closed. For completeness I used both cron jobs sm-closed-conversations-mark-for-deletion and sm-closed-conversations-deletion. I changed the dates in the db of when conversations were closed and ran the former to change the mark_for_deletion status and the later to then delete.
N.B There is still a gap which we need to discuss in a tech session. It's feasible a conversation could be re-opened in the 23 hours it has been marked for deletion and therefore should not be deleted. There is a number of ways we might want to tackle that
Jira