Skip to content

Commit

Permalink
Merge pull request #175 from freenowtech/plugin-update-scheduler-cron…
Browse files Browse the repository at this point in the history
…-from-configurations

Change Plugins update scheduler to run according to the cron in the configs
  • Loading branch information
ocristian authored Feb 28, 2025
2 parents 2d2d746 + db05301 commit 00ca00a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Sauron has an embedded plugin system that allows anyone to insert its own busine
information during the building/deploy process. It uses the [PF4J](https://github.com/pf4j/pf4j) which is a plugin
framework written in Java, and provides a nice interface to implement an integration in your service.

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public class AutomaticPluginUpdater

private final ApplicationEventPublisher applicationEventPublisher;

private static final long PLUGIN_UPDATE_DELAY_MILLIS = 300000;


@Autowired
public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginManager, ApplicationEventPublisher applicationEventPublisher)
Expand All @@ -32,7 +30,7 @@ public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginM
}


@Scheduled(fixedDelay = PLUGIN_UPDATE_DELAY_MILLIS)
@Scheduled(cron = "${plugin.update.scheduler.cron}")
public void update()
{
PluginsLoadedEvent event = new PluginsLoadedEvent();
Expand Down

0 comments on commit 00ca00a

Please sign in to comment.