-
Notifications
You must be signed in to change notification settings - Fork 2
merge check indexation status and reindex all in one endpoint #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
base: main
Are you sure you want to change the base?
Conversation
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.
Add some TU otherwise you have 0% coverage
Kudos, SonarCloud Quality Gate passed! |
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.
Code Review OK
Tests OK (standard, with study-server stopped, with conversion-server stopped)
@@ -1663,6 +1663,13 @@ public void reindexStudy(UUID studyUuid) { | |||
} | |||
|
|||
@Transactional | |||
public void reindexStudyIfNeeded(UUID studyUuid) { | |||
StudyIndexationStatus status = getStudyIndexationStatus(studyUuid); |
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.
Make private getStudyIndexationStatus
@ApiResponse(responseCode = "200", description = "Study reindexed") | ||
public ResponseEntity<Void> reindexStudy(@Parameter(description = "study uuid") @PathVariable("studyUuid") UUID studyUuid) { | ||
studyService.reindexStudy(studyUuid); | ||
@PostMapping(value = "/studies/{studyUuid}/reindex-if-needed") |
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.
I think it might be better to keep the endpoint reindex-all
to force reindexation ?
/studies/{studyUuid}/reindex-all?if-needed=true/false
No description provided.