Pull request #242: RED-3437: Fixed several bugs in workflow
Merge in RED/persistence-service from RED-3437 to master * commit '1b27dae3d875068a1f62bd2477cac66eebe009e8': RED-3437: Fixed several bugs in workflow
This commit is contained in:
commit
bee684b544
@ -37,8 +37,8 @@ public class FileStatusProcessingUpdateService {
|
||||
if (settings.isNerServiceEnabled() && !fileManagementStorageService.nerEntitiesExists(dossierId, fileId)) {
|
||||
fileStatusService.addToNerQueue(dossierId, fileId);
|
||||
} else {
|
||||
analyzeResult.setMessageType(MessageType.ANALYSE);
|
||||
analysisSuccessful(dossierId, fileId, analyzeResult);
|
||||
fileStatusService.setStatusAnalyse(dossierId, fileId, 1);
|
||||
fileStatusService.addToAnalysisQueue(dossierId, fileId, 2, null);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@ -95,6 +95,7 @@ public class FileStatusService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setStatusProcessing(String fileId) {
|
||||
|
||||
fileStatusPersistenceService.updateProcessingStatus(fileId, ProcessingStatus.PROCESSING);
|
||||
|
||||
@ -614,10 +614,18 @@ public class ManualRedactionService {
|
||||
public void updateProcessedDate(String fileId, ManualRedactions manualRedactions) {
|
||||
|
||||
// These are marked as processed once analysis completes, not when they are set as approved
|
||||
manualRedactions.getIdsToRemove().forEach(removeRedactionPersistenceService::markAsProcessed);
|
||||
manualRedactions.getForceRedactions().forEach(forceRedactionPersistenceService::markAsProcessed);
|
||||
manualRedactions.getImageRecategorization().forEach(recategorizationPersistenceService::markAsProcessed);
|
||||
if(manualRedactions != null) {
|
||||
|
||||
if(manualRedactions.getIdsToRemove() != null) {
|
||||
manualRedactions.getIdsToRemove().forEach(removeRedactionPersistenceService::markAsProcessed);
|
||||
}
|
||||
if(manualRedactions.getForceRedactions() != null) {
|
||||
manualRedactions.getForceRedactions().forEach(forceRedactionPersistenceService::markAsProcessed);
|
||||
}
|
||||
if(manualRedactions.getImageRecategorization() != null) {
|
||||
manualRedactions.getImageRecategorization().forEach(recategorizationPersistenceService::markAsProcessed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ public class NerMessageReceiver {
|
||||
String fileId = (String) entityResponse.get("fileId");
|
||||
|
||||
log.info("Received NER Message from {} {}", dossierId, fileId);
|
||||
fileStatusService.addToAnalysisQueue(dossierId, fileId, 2, null);
|
||||
fileStatusService.setStatusAnalyse(dossierId, fileId, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user