RED-7384: migration fixes
* finalize migration again for "persistence-service-ready": true details
This commit is contained in:
parent
b62f4a390d
commit
bf6c362a37
@ -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