Skip to content

Commit f11b012

Browse files
committed
Revert: Change Plugin Update Scheduler to Fixed Delay Due to Dependency on Plugins Load Healthy Indicator
1 parent 06f0cf3 commit f11b012

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

sauron-service/src/main/java/com/freenow/sauron/plugins/AutomaticPluginUpdater.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.freenow.sauron.plugins;
22

3-
import javax.annotation.PostConstruct;
43
import lombok.extern.slf4j.Slf4j;
54
import org.pf4j.PluginManager;
65
import org.pf4j.PluginRuntimeException;
@@ -21,6 +20,8 @@ public class AutomaticPluginUpdater
2120

2221
private final ApplicationEventPublisher applicationEventPublisher;
2322

23+
private static final long PLUGIN_UPDATE_DELAY_MILLIS = 300000;
24+
2425

2526
@Autowired
2627
public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginManager, ApplicationEventPublisher applicationEventPublisher)
@@ -30,15 +31,8 @@ public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginM
3031
this.applicationEventPublisher = applicationEventPublisher;
3132
}
3233

33-
@PostConstruct
34-
public void init()
35-
{
36-
log.info("Starting automatic plugin updater...");
37-
update();
38-
log.info("Plugins have been loaded.");
39-
}
4034

41-
@Scheduled(cron = "${plugin.update.scheduler.cron}")
35+
@Scheduled(fixedDelay = PLUGIN_UPDATE_DELAY_MILLIS)
4236
public void update()
4337
{
4438
PluginsLoadedEvent event = new PluginsLoadedEvent();

0 commit comments

Comments
 (0)