diff --git a/.dev/docker-compose.yaml b/.dev/docker-compose.yaml old mode 100644 new mode 100755 diff --git a/persistence-service-v1/persistence-service-processor-v1/pom.xml b/persistence-service-v1/persistence-service-processor-v1/pom.xml index 8ff5c0fa3..ef295ab42 100644 --- a/persistence-service-v1/persistence-service-processor-v1/pom.xml +++ b/persistence-service-v1/persistence-service-processor-v1/pom.xml @@ -18,8 +18,8 @@ 0.4.0 0.5.0 0.18.0 - 0.8.0 - 0.13.0 + 0.9.0 + 0.15.0 diff --git a/persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/migration/SaasMigrationService.java b/persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/migration/SaasMigrationService.java index 0b4335c44..cb023ab9a 100644 --- a/persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/migration/SaasMigrationService.java +++ b/persistence-service-v1/persistence-service-processor-v1/src/main/java/com/iqser/red/service/persistence/management/v1/processor/migration/SaasMigrationService.java @@ -16,6 +16,8 @@ import com.iqser.red.service.redaction.v1.model.MigrationRequest; import com.iqser.red.storage.commons.exception.StorageException; import com.iqser.red.storage.commons.exception.StorageObjectDoesNotExist; import com.iqser.red.storage.commons.service.StorageService; +import com.knecon.fforesight.databasetenantcommons.providers.TenantSyncService; +import com.knecon.fforesight.databasetenantcommons.providers.events.TenantSyncEvent; import com.knecon.fforesight.tenantcommons.TenantContext; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -30,7 +32,7 @@ import static com.knecon.fforesight.service.layoutparser.internal.api.queue.Layo @Slf4j @Service @RequiredArgsConstructor -public class SaasMigrationService { +public class SaasMigrationService implements TenantSyncService { private final AutomaticAnalysisJob automaticAnalysisJob; private final FileStatusPersistenceService fileStatusPersistenceService; @@ -45,6 +47,13 @@ public class SaasMigrationService { private final SaasAnnotationIdMigrationService saasAnnotationIdMigrationService; + + @Override + public void syncTenant(TenantSyncEvent tenantSyncEvent) { + + startMigrationForTenant(tenantSyncEvent.getTenantId()); + } + // Persistence-Service needs to be scaled to 1. public void startMigrationForTenant(String tenantId) { @@ -138,4 +147,6 @@ public class SaasMigrationService { } + + } diff --git a/persistence-service-v1/persistence-service-server-v1/src/main/resources/application-dev.yaml b/persistence-service-v1/persistence-service-server-v1/src/main/resources/application-dev.yaml index c49a6fac7..0be5aa24b 100644 --- a/persistence-service-v1/persistence-service-server-v1/src/main/resources/application-dev.yaml +++ b/persistence-service-v1/persistence-service-server-v1/src/main/resources/application-dev.yaml @@ -35,3 +35,6 @@ persistence-service: fforesight: springdoc: auth-server-url: 'http://localhost:8080/auth' + jobs: + enabled: true + diff --git a/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml b/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml index 42d540984..22c0b5cab 100644 --- a/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml +++ b/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml @@ -10,7 +10,7 @@ tenant-user-management-service.url: "http://tenant-user-management-service:8080/ application: type: "RedactManager" rss.component-log.enabled: false - + server: port: 8080 @@ -89,6 +89,7 @@ multitenancy: prepStmtCacheSqlLimit: 2048 liquibase: changeLog: classpath:db/changelog/db.changelog-tenant.yaml + clear-checksums: true bucket4j: @@ -123,6 +124,7 @@ fforesight: user-exchange: name: 'users-exchange' jobs: + enabled: true tenants: remote: true diff --git a/persistence-service-v1/pom.xml b/persistence-service-v1/pom.xml index 7f35315ca..ac006cf9c 100755 --- a/persistence-service-v1/pom.xml +++ b/persistence-service-v1/pom.xml @@ -6,7 +6,7 @@ com.iqser.red platform-dependency - 2.2.0 + 2.19.0