Skip to content

Commit b629679

Browse files
authored
Merge pull request #176 from freenowtech/plugin-update-startup
Plugin Updater - Start on Application Startup.
2 parents 3eb6e7d + 296c188 commit b629679

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
java-version: 11
1717

1818
- name: Cache Maven packages
19-
uses: actions/cache@v2
19+
uses: actions/cache@v3
2020
with:
2121
path: ~/.m2
2222
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

.github/workflows/release-components.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: git pull
4343

4444
- name: Cache Maven packages
45-
uses: actions/cache@v2
45+
uses: actions/cache@v3
4646
with:
4747
path: ~/.m2
4848
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

.github/workflows/release-plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
run: git pull
6262

6363
- name: Cache Maven packages
64-
uses: actions/cache@v2
64+
uses: actions/cache@v3
6565
with:
6666
path: ~/.m2
6767
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

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

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

3+
import javax.annotation.PostConstruct;
34
import lombok.extern.slf4j.Slf4j;
45
import org.pf4j.PluginManager;
56
import org.pf4j.PluginRuntimeException;
@@ -29,6 +30,13 @@ public AutomaticPluginUpdater(UpdateManager updateManager, PluginManager pluginM
2930
this.applicationEventPublisher = applicationEventPublisher;
3031
}
3132

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

3341
@Scheduled(cron = "${plugin.update.scheduler.cron}")
3442
public void update()

0 commit comments

Comments
 (0)