diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java index 95d9f5131..44d6fca79 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/PeriodicMiner.java @@ -74,7 +74,7 @@ private Project getKnownProject() { } void mine(@Observes StartupEvent event) { - vertx.setTimer(TimeUnit.MINUTES.toMillis(5), v -> mineRandomRepo()); + vertx.setTimer(TimeUnit.MINUTES.toMillis(5), v -> vertx.executeBlocking(it -> mineRandomRepo())); } private void mineRandomRepo() { @@ -107,7 +107,7 @@ private void mineRandomRepo() { logger.atWarning().withCause(e).log("Failed to mine random repo"); registry.counter("mining.error").increment(); } finally { - vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> mineRandomRepo()); + vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.executeBlocking(it -> mineRandomRepo())); } }