Merge branch 'RED-7384' into 'release/2.349.x'
RED-7384: migration fixes See merge request redactmanager/persistence-service!421
This commit is contained in:
commit
23357c4833
@ -113,6 +113,9 @@ public class SaasMigrationService implements TenantSyncService {
|
||||
}
|
||||
|
||||
log.info("Added {} documents for tenant {} to Layout-Parsing queue for saas migration", numberOfFiles, TenantContext.getTenantId());
|
||||
if (numberOfFiles == 0) {
|
||||
finalizeMigration();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -227,8 +230,7 @@ public class SaasMigrationService implements TenantSyncService {
|
||||
saasMigrationStatusPersistenceService.updateStatus(fileId, SaasMigrationStatus.FINISHED);
|
||||
|
||||
log.info("AnnotationIds migration finished for saas migration for tenant {} dossier {} and file {}", TenantContext.getTenantId(), dossierId, fileId);
|
||||
// finalizeMigration(); // AutomaticAnalysisJob should be re-enabled by re-starting the persistence service pod after a rule change
|
||||
// This ensures no analysis will happen with outdated rules
|
||||
finalizeMigration();
|
||||
}
|
||||
|
||||
|
||||
@ -297,7 +299,7 @@ public class SaasMigrationService implements TenantSyncService {
|
||||
private void finalizeMigration() {
|
||||
|
||||
if (saasMigrationStatusPersistenceService.countByStatus(SaasMigrationStatus.FINISHED) == saasMigrationStatusPersistenceService.countAll()) {
|
||||
automaticAnalysisJob.startForTenant(TenantContext.getTenantId());
|
||||
// automaticAnalysisJob.startForTenant(TenantContext.getTenantId()); // AutomaticAnalysisJob should be re-enabled by re-starting the persistence service pod after a rule change
|
||||
tenantProvider.updateDetails(TenantContext.getTenantId(), UpdateDetailsRequest.builder().key("persistence-service-ready").value(true).build());
|
||||
log.info("Saas migration finished for tenantId {}, re-enabled scheduler", TenantContext.getTenantId());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user