Skip to content

Commit 00ca00a

Browse files
authored
Merge pull request #175 from freenowtech/plugin-update-scheduler-cron-from-configurations
Change Plugins update scheduler to run according to the cron in the configs
2 parents 2d2d746 + db05301 commit 00ca00a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Sauron has an embedded plugin system that allows anyone to insert its own busine
193193
information during the building/deploy process. It uses the [PF4J](https://github.com/pf4j/pf4j) which is a plugin
194194
framework written in Java, and provides a nice interface to implement an integration in your service.
195195

196-
During the startup Sauron loads all available plugins, and updates them every **5 minutes** using the pre-defined
196+
During the startup Sauron loads all available plugins, and updates them according to the scheduler configuration using the pre-defined
197197
plugin repository (Local or Artifactory). For more details please refer to
198198
[sauron-service.yml](https://github.com/freenowtech/sauron/blob/main/sauron-service/docker/config/sauron-service.yml).
199199

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public class AutomaticPluginUpdater
2020

2121
private final ApplicationEventPublisher applicationEventPublisher;
2222

23-
private static final long PLUGIN_UPDATE_DELAY_MILLIS = 300000;
24-
2523

2624
@Autowired
2725
public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginManager, ApplicationEventPublisher applicationEventPublisher)
@@ -32,7 +30,7 @@ public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginM
3230
}
3331

3432

35-
@Scheduled(fixedDelay = PLUGIN_UPDATE_DELAY_MILLIS)
33+
@Scheduled(cron = "${plugin.update.scheduler.cron}")
3634
public void update()
3735
{
3836
PluginsLoadedEvent event = new PluginsLoadedEvent();

0 commit comments

Comments
 (0)