Commit 778ca87c by Johannes Edmeier

Merge branch '1.3.x'

parents 6ecb99e0 6b55c511
......@@ -20,6 +20,7 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
......@@ -203,16 +204,18 @@ public class AdminServerWebConfiguration extends WebMvcConfigurerAdapter
@Bean
public ScheduledTaskRegistrar updateTaskRegistrar() {
ScheduledTaskRegistrar registrar = new ScheduledTaskRegistrar();
return new ScheduledTaskRegistrar();
}
registrar.addFixedRateTask(new Runnable() {
@EventListener
public void onApplicationReadyEvent(ApplicationReadyEvent event) {
updateTaskRegistrar().addFixedRateTask(new Runnable() {
@Override
public void run() {
statusUpdater().updateStatusForAllApplications();
}
}, adminServerProperties().getMonitor().getPeriod());
return registrar;
updateTaskRegistrar().afterPropertiesSet();
}
@Bean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment