File tree Expand file tree Collapse file tree
serving/src/main/java/feast/serving/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747public class ServingApiConfiguration implements WebMvcConfigurer {
4848
4949 @ Autowired private ProtobufJsonFormatHttpMessageConverter protobufConverter ;
50+ private ScheduledExecutorService scheduledExecutorService =
51+ Executors .newSingleThreadScheduledExecutor ();
5052
5153 @ Bean
5254 public AppConfig getAppConfig (
@@ -67,14 +69,12 @@ public SpecStorage getCoreServiceSpecStorage(
6769 @ Value ("${feast.core.host}" ) String coreServiceHost ,
6870 @ Value ("${feast.core.grpc.port}" ) String coreServicePort ,
6971 @ Value ("${feast.cacheDurationMinute}" ) int cacheDurationMinute ) {
70- ScheduledExecutorService scheduledExecutorService =
71- Executors .newSingleThreadScheduledExecutor ();
7272 final CachedSpecStorage cachedSpecStorage =
7373 new CachedSpecStorage (new CoreService (coreServiceHost , Integer .parseInt (coreServicePort )));
7474
7575 // reload all specs including new ones periodically
7676 scheduledExecutorService .schedule (
77- () -> cachedSpecStorage . populateCache () , cacheDurationMinute , TimeUnit .MINUTES );
77+ cachedSpecStorage :: populateCache , cacheDurationMinute , TimeUnit .MINUTES );
7878
7979 // load all specs during start up
8080 try {
You can’t perform that action at this time.
0 commit comments