diff --git a/src/main/java/com/loafle/overflow/container/configuration/ContainerConfiguration.java b/src/main/java/com/loafle/overflow/container/configuration/ContainerConfiguration.java index 26f79e5..97703e2 100644 --- a/src/main/java/com/loafle/overflow/container/configuration/ContainerConfiguration.java +++ b/src/main/java/com/loafle/overflow/container/configuration/ContainerConfiguration.java @@ -71,7 +71,7 @@ public class ContainerConfiguration { return new JSONRPCClientCodec(this.objectMapper); } - @Bean(Container.RPC_CLIENT_CODEC) + @Bean() public RPCClientHandler rpcClientHandler() { return new RPCClientHandler(); } diff --git a/src/main/java/com/loafle/overflow/container/service/ContainerCollectorService.java b/src/main/java/com/loafle/overflow/container/service/ContainerCollectorService.java index 3198227..387b1d9 100644 --- a/src/main/java/com/loafle/overflow/container/service/ContainerCollectorService.java +++ b/src/main/java/com/loafle/overflow/container/service/ContainerCollectorService.java @@ -87,7 +87,7 @@ public class ContainerCollectorService implements CollectorService { logger.error("Cannot get data from crawler[%s] %s", sensorConfig.getCrawler().getName(), e.getMessage()); } }; - ScheduledFuture sf = this.scheduledExecutorService.schedule(task, interval, TimeUnit.SECONDS); + ScheduledFuture sf = this.scheduledExecutorService.scheduleWithFixedDelay(task, 0, interval, TimeUnit.SECONDS); this.scheduleMap.put(sensorConfig.getConfigID(), sf); }