Resolve RED-7889 #206
0
.dev/docker-compose.yaml
Normal file → Executable file
0
.dev/docker-compose.yaml
Normal file → Executable file
@ -18,8 +18,8 @@
|
||||
<bucket4j.spring.version>0.4.0</bucket4j.spring.version>
|
||||
<swagger-commons.version>0.5.0</swagger-commons.version>
|
||||
<keycloak-commons.version>0.18.0</keycloak-commons.version>
|
||||
<jobs-commons.version>0.8.0</jobs-commons.version>
|
||||
<database-tenant-commons.version>0.13.0</database-tenant-commons.version>
|
||||
<jobs-commons.version>0.9.0</jobs-commons.version>
|
||||
<database-tenant-commons.version>0.15.0</database-tenant-commons.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
|
||||
@ -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 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -35,3 +35,6 @@ persistence-service:
|
||||
fforesight:
|
||||
springdoc:
|
||||
auth-server-url: 'http://localhost:8080/auth'
|
||||
jobs:
|
||||
enabled: true
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.iqser.red</groupId>
|
||||
<artifactId>platform-dependency</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<version>2.19.0</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user