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

Pivotal ID # 184822139: Delete Submission Folder After Resubmission #707

Conversation

Juan-EBI
Copy link
Contributor

https://www.pivotaltracker.com/story/show/184822139

  • simplified code to have a single delete files operation.

Copy link
Contributor

@jhoanmanuelms jhoanmanuelms left a comment

Choose a reason for hiding this comment

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

The changes look good and do simplify the code. Please consider my comments before merging

private val submissionPersistenceService: SubmissionPersistenceService,
private val submissionRequestFinalizer: SubmissionRequestFinalizer,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like very much the idea of including the SubmissionRequestFinalizer here since it's part of the submission workflow

deleteRemainingFiles(null, submission)
}

private fun deleteRemainingFiles(current: ExtSubmission?, previous: ExtSubmission) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is the logic that should be moved to the FileStorageService and then be used in both places since it makes more sense to me to have a storage services that deletes files that later is used by both, the RequestFinalizer and the SubmissionService than the SubmissionService using the RequestFinalizer directly

@Juan-EBI Juan-EBI merged commit 9d44e00 into master May 16, 2023
@Juan-EBI Juan-EBI deleted the feature/pivotal-184822139-Delete-submission-folder-after-resubmission branch May 17, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants