network load status - #1067
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Meklo
left a comment
There was a problem hiding this comment.
It might be worth to also add or tweak a reindexation test to check if the study goes through UNLOADED -> LOADED status
| } | ||
|
|
||
| @Transactional(readOnly = true) | ||
| public List<UUID> getLoadedStudyUuids(List<UUID> studyUuids) { |
There was a problem hiding this comment.
Better fitted in StudyService no ? It may have other usages outside of supervision scope
| @GetMapping(value = "/studies/loaded") | ||
| @Operation(summary = "Get the study uuids whose network is currently loaded") | ||
| @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "List of the study uuids whose network is currently loaded")}) | ||
| public ResponseEntity<List<UUID>> getLoadedStudies(@Parameter(description = "Study uuids to filter") @RequestParam("ids") List<UUID> studyUuids) { |
There was a problem hiding this comment.
Could be moved to study controller as well no ?
| self.updateNetworkLoadStatus(studyUuid, NetworkLoadStatus.UNLOADING); | ||
| var rootNodeUuid = networkModificationTreeService.getStudyRootNodeUuid(studyUuid); | ||
| // First we unbuild all nodes | ||
| doUnbuildNodeTree(studyUuid, rootNodeUuid, true, true, userId); | ||
| // Then we erase data linked to root node on all root networks | ||
| rootNetworkService.invalidateRootNetworkRemoteInfos(List.of(rootNetworkService.getRootNetworkInfos(rootNetworkUuid)), true, false); | ||
| rootNetworkService.updateRootNetworkIndexationStatus(studyUuid, rootNetworkUuid, RootNetworkIndexationStatus.NOT_INDEXED); | ||
| self.updateNetworkLoadStatus(studyUuid, NetworkLoadStatus.UNLOADED); | ||
| notificationService.emitRootNetworksUpdated(studyUuid); |
There was a problem hiding this comment.
Those load status update might be better placed in one level above in invalidateStudy. Otherwise the study will switch to UNLOADING multiple times during an invalidation with multiple root networks. Also, in a multi root network situation, a study might have the UNLOADED status even if some root networks failed to unload



PR Summary
network load status