Skip to content

Commit

Permalink
fix: 🐛 Fix UI thead blocking (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed May 7, 2023
1 parent e57ad0c commit e2b448c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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()));
}
}

Expand Down

0 comments on commit e2b448c

Please sign in to comment.