Skip to content

Commit

Permalink
fix(vertx): Use publish instead of send
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Jul 13, 2023
1 parent 77f22d8 commit 7b89a83
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ void startup(@Observes StartupEvent event) {
vertx.deployVerticle(spoonPeriodicMiner, options);
vertx.deployVerticle(persistence, options);
vertx.deployVerticle(projectSupplier, options);
vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.eventBus()
.send("miner", new MineNextProject(QodanaPeriodicMiner.ANALYZER_NAME)));
vertx.setTimer(TimeUnit.MINUTES.toMillis(1), v -> vertx.eventBus()
.send("miner", new MineNextProject(SpoonPeriodicMiner.ANALYZER_NAME)));
vertx.eventBus().addInboundInterceptor(v -> {
System.out.println("Received message: " + v.toString());
v.next();
});
vertx.setTimer(TimeUnit.MINUTES.toMillis(3), v -> vertx.eventBus()
.publish("miner", new MineNextProject(QodanaPeriodicMiner.ANALYZER_NAME)));
vertx.setTimer(TimeUnit.MINUTES.toMillis(3), v -> vertx.eventBus()
.publish("miner", new MineNextProject(SpoonPeriodicMiner.ANALYZER_NAME)));
}
}

0 comments on commit 7b89a83

Please sign in to comment.