Skip to content

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

achour94
Copy link
Contributor

@achour94 achour94 commented Oct 4, 2023

No description provided.

Copy link
Contributor

@sBouzols sBouzols left a 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

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@achour94 achour94 requested a review from sBouzols October 17, 2023 14:05
Copy link
Contributor

@sBouzols sBouzols left a 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);
Copy link
Contributor

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")
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 it might be better to keep the endpoint reindex-all to force reindexation ?
/studies/{studyUuid}/reindex-all?if-needed=true/false

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.

3 participants