Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vertx): Fix wrong message for vertx eventbus #839

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -83,6 +83,5 @@ private void addOrUpdateCommitHash(Project project, CodeAnalyzerResult spoonResu
oldProject.addCommitHash(gitHubCommit);
projectRepository.save(oldProject);
}
vertx.eventBus().send(AnalyzerResultsPersistence.SERVICE_NAME, project);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
}