diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/QodanaPeriodicMiner.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/QodanaPeriodicMiner.java index e6e612333..012546ed6 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/QodanaPeriodicMiner.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/QodanaPeriodicMiner.java @@ -81,7 +81,8 @@ void mine(@Observes StartupEvent event) { try { logger.atInfo().log("Starting Qodana periodic miner"); vertx.exceptionHandler(it -> logger.atWarning().withCause(it).log("Exception in vertx")); - vertx.setTimer(TimeUnit.MINUTES.toMillis(3), v -> vertx.createSharedWorkerExecutor("MINING", 5, 30L) + vertx.setTimer(TimeUnit.MINUTES.toMillis(3), v -> vertx.createSharedWorkerExecutor( + "MINING", 5, 30L, TimeUnit.MINUTES) .executeBlocking(it -> mineRandomRepo())); } catch (Exception e) { logger.atWarning().withCause(e).log("Failed to repo with Qodana"); @@ -126,7 +127,8 @@ private void mineRandomRepo() { } finally { logger.atInfo().log("Queue size: %s", queue.size()); logger.atInfo().log("Mining next repo in 1 minute"); - vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.createSharedWorkerExecutor("MINING", 5, 30L) + vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.createSharedWorkerExecutor( + "MINING", 5, 30L, TimeUnit.MINUTES) .executeBlocking(it -> mineRandomRepo())); } } diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/SpoonPeriodicMiner.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/SpoonPeriodicMiner.java index d26e3a046..84a19a21a 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/SpoonPeriodicMiner.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/SpoonPeriodicMiner.java @@ -76,7 +76,8 @@ void mine(@Observes StartupEvent event) { try { logger.atInfo().log("Start mining with spoon"); vertx.exceptionHandler(it -> logger.atWarning().withCause(it).log("Exception in vertx")); - vertx.setTimer(TimeUnit.MINUTES.toMillis(3), v -> vertx.createSharedWorkerExecutor("MINING", 5, 30L) + vertx.setTimer(TimeUnit.MINUTES.toMillis(3), v -> vertx.createSharedWorkerExecutor( + "MINING", 5, 30L, TimeUnit.MINUTES) .executeBlocking(it -> mineRandomRepo())); } catch (Exception e) { logger.atWarning().withCause(e).log("Failed to repo with spoon"); @@ -118,7 +119,8 @@ private void mineRandomRepo() { } finally { logger.atInfo().log("Queue size: %s", queue.size()); logger.atInfo().log("Mining next repo in 1 minute"); - vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.createSharedWorkerExecutor("MINING", 5, 30L) + vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.createSharedWorkerExecutor( + "MINING", 5, 30L, TimeUnit.MINUTES) .executeBlocking(it -> mineRandomRepo())); } }