Migration local testing

This commit is contained in:
Timo Bejan 2023-11-23 21:38:09 +02:00
parent 5d6ed6bba8
commit e73b6bd69b
3 changed files with 16 additions and 4 deletions

View File

@ -141,7 +141,7 @@ public class UserMessagingConfiguration {
@Bean(name = "userExchange")
TopicExchange tenantExchange(@Value("${fforesight.user-exchange.name}") String userExchange) {
TopicExchange userExchange(@Value("${fforesight.user-exchange.name}") String userExchange) {
return new TopicExchange(userExchange);
}

View File

@ -99,8 +99,8 @@ public class SaasMigrationService implements TenantSyncService {
public void handleError(String dossierId, String fileId, String errorCause, String retryQueue) {
var migrationEntry = saasMigrationStatusPersistenceService.findById(fileId);
int numErrors = migrationEntry.getProcessingErrorCounter();
if (numErrors <= settings.getMaxErrorRetries()) {
Integer numErrors = migrationEntry.getProcessingErrorCounter();
if (numErrors !=null && numErrors <= settings.getMaxErrorRetries()) {
saasMigrationStatusPersistenceService.updateErrorCounter(fileId, numErrors + 1, errorCause);
rabbitTemplate.convertAndSend(retryQueue, MigrationRequest.builder()
.dossierId(dossierId)

View File

@ -22,6 +22,7 @@ multitenancy:
prepStmtCacheSqlLimit: 2048
liquibase:
changeLog: classpath:db/changelog/db.changelog-tenant.yaml
clear-checksums: true
monitoring:enabled: true
cors.enabled: true
@ -37,4 +38,15 @@ fforesight:
auth-server-url: 'http://localhost:8080/auth'
jobs:
enabled: true
datasource:
url: jdbc:postgresql://${PSQL_HOST:localhost}:${PSQL_PORT:25432}/${PSQL_DATABASE:tenantmanager}?ApplicationName=${spring.application.name:}-scheduler&cachePrepStmts=true&useServerPrepStmts=true&rewriteBatchedStatements=true
driverClassName: org.postgresql.Driver
username: ${PSQL_USERNAME:tenantmanager}
password: ${PSQL_PASSWORD:r3dact3d}
platform: org.hibernate.dialect.PostgreSQL95Dialect
hikari:
maximumPoolSize: 2
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 1000
prepStmtCacheSqlLimit: 2048