From 5e9f3b30bfef9ab83b735281710149fed83f5f58 Mon Sep 17 00:00:00 2001 From: Martin Wittlinger Date: Fri, 14 Jul 2023 20:11:43 +0200 Subject: [PATCH] fix(vertx): Fix wrong message for vertx eventbus (#839) --- .../laughing_train/mining/AnalyzerResultsPersistence.java | 3 +-- .../martinwitt/laughing_train/mining/QodanaPeriodicMiner.java | 4 ++-- .../martinwitt/laughing_train/mining/SpoonPeriodicMiner.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/AnalyzerResultsPersistence.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/AnalyzerResultsPersistence.java index a7f56e821..35a8d7e17 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/AnalyzerResultsPersistence.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/mining/AnalyzerResultsPersistence.java @@ -41,7 +41,7 @@ void persistResults(StoreResults storeResults) { } else if (result instanceof CodeAnalyzerResult.Success success) { logger.atInfo().log("Analyzer %s succeeded for project %s", storeResults.analyzerName(), project.name()); } - vertx.eventBus().send(MiningStartup.SERVICE_NAME, storeResults.analyzerName()); + vertx.eventBus().publish(MiningStartup.SERVICE_NAME, storeResults.analyzerName()); } private AnalyzerStatus getAnalyzerStatus(CodeAnalyzerResult spoonResult, String name) { @@ -83,6 +83,5 @@ private void addOrUpdateCommitHash(Project project, CodeAnalyzerResult spoonResu oldProject.addCommitHash(gitHubCommit); projectRepository.save(oldProject); } - vertx.eventBus().send(AnalyzerResultsPersistence.SERVICE_NAME, project); } } 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 ca7d1d212..6ec0e52e3 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 @@ -88,7 +88,7 @@ private void storeFailure(ProjectResult.Success success, QodanaResult.Failure er tryDeleteProject(success); StoreResults storeResults = new StoreResults(success.project(), new CodeAnalyzerResult.Failure(error.message()), ANALYZER_NAME); - vertx.eventBus().send(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); + vertx.eventBus().publish(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); } private void storeSuccess(ProjectResult.Success success, QodanaResult.Success qodanaSuccess) { @@ -97,6 +97,6 @@ private void storeSuccess(ProjectResult.Success success, QodanaResult.Success qo success.project(), new CodeAnalyzerResult.Success(qodanaSuccess.result(), success.project()), ANALYZER_NAME); - vertx.eventBus().send(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); + vertx.eventBus().publish(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); } } 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 77dc89d1b..6738534de 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 @@ -87,7 +87,7 @@ private void storeFailure(ProjectResult.Success success, CodeAnalyzerResult.Fail tryDeleteProject(success); StoreResults storeResults = new StoreResults(success.project(), new CodeAnalyzerResult.Failure(error.message()), ANALYZER_NAME); - vertx.eventBus().send(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); + vertx.eventBus().publish(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); } private void storeSuccess(ProjectResult.Success success, CodeAnalyzerResult.Success spoonSuccess) { @@ -96,6 +96,6 @@ private void storeSuccess(ProjectResult.Success success, CodeAnalyzerResult.Succ success.project(), new CodeAnalyzerResult.Success(spoonSuccess.results(), success.project()), ANALYZER_NAME); - vertx.eventBus().send(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); + vertx.eventBus().publish(AnalyzerResultsPersistence.SERVICE_NAME, storeResults); } }