Move default TenantResolver registration in hawkbit-core (#2778)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -18,7 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.eclipse.hawkbit.repository.AutoAssignExecutor;
|
||||
import org.eclipse.hawkbit.repository.SystemManagement;
|
||||
import org.eclipse.hawkbit.security.SystemSecurityContext;
|
||||
import org.eclipse.hawkbit.tenancy.TenantMetricsConfiguration;
|
||||
import org.eclipse.hawkbit.tenancy.DefaultTenantConfiguration;
|
||||
import org.springframework.integration.support.locks.LockRegistry;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class AutoAssignScheduler {
|
||||
meterRegistry
|
||||
.map(mReg -> mReg.timer(
|
||||
"hawkbit.scheduler.executor",
|
||||
TenantMetricsConfiguration.TENANT_TAG, tenant))
|
||||
DefaultTenantConfiguration.TENANT_TAG, tenant))
|
||||
.ifPresent(timer -> timer.record(System.nanoTime() - startNanoT, TimeUnit.NANOSECONDS));
|
||||
});
|
||||
} finally {
|
||||
|
||||
@@ -20,8 +20,8 @@ import org.eclipse.hawkbit.repository.RolloutExecutor;
|
||||
import org.eclipse.hawkbit.repository.RolloutHandler;
|
||||
import org.eclipse.hawkbit.repository.RolloutManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.utils.DeploymentHelper;
|
||||
import org.eclipse.hawkbit.tenancy.DefaultTenantConfiguration;
|
||||
import org.eclipse.hawkbit.tenancy.TenantAware;
|
||||
import org.eclipse.hawkbit.tenancy.TenantMetricsConfiguration;
|
||||
import org.springframework.integration.support.locks.LockRegistry;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class JpaRolloutHandler implements RolloutHandler {
|
||||
}
|
||||
});
|
||||
meterRegistry
|
||||
.map(mReg -> mReg.timer("hawkbit.rollout.handler.all", TenantMetricsConfiguration.TENANT_TAG, tenantAware.getCurrentTenant()))
|
||||
.map(mReg -> mReg.timer("hawkbit.rollout.handler.all", DefaultTenantConfiguration.TENANT_TAG, tenantAware.getCurrentTenant()))
|
||||
.ifPresent(timer -> timer.record(System.nanoTime() - startNano, TimeUnit.NANOSECONDS));
|
||||
|
||||
log.debug("Finished handling of the rollouts.");
|
||||
@@ -116,9 +116,8 @@ public class JpaRolloutHandler implements RolloutHandler {
|
||||
meterRegistry
|
||||
.map(mReg -> mReg.timer(
|
||||
"hawkbit.rollout.handler",
|
||||
TenantMetricsConfiguration.TENANT_TAG, tenantAware.getCurrentTenant(),
|
||||
DefaultTenantConfiguration.TENANT_TAG, tenantAware.getCurrentTenant(),
|
||||
"rollout", String.valueOf(rolloutId)))
|
||||
.ifPresent(timer -> timer.record(System.nanoTime() - startNano, TimeUnit.NANOSECONDS));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.repository.RolloutHandler;
|
||||
import org.eclipse.hawkbit.repository.SystemManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.rollout.BlockWhenFullPolicy;
|
||||
import org.eclipse.hawkbit.security.SystemSecurityContext;
|
||||
import org.eclipse.hawkbit.tenancy.TenantMetricsConfiguration;
|
||||
import org.eclipse.hawkbit.tenancy.DefaultTenantConfiguration;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class RolloutScheduler {
|
||||
meterRegistry
|
||||
.map(mReg -> mReg.timer(
|
||||
"hawkbit.rollout.scheduler",
|
||||
TenantMetricsConfiguration.TENANT_TAG, tenant))
|
||||
DefaultTenantConfiguration.TENANT_TAG, tenant))
|
||||
.ifPresent(timer -> timer.record(System.nanoTime() - startNano, TimeUnit.NANOSECONDS));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user