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

Reconciler rabbit fixes #199

Merged
merged 2 commits into from
Nov 24, 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
10 changes: 2 additions & 8 deletions reconciler/src/main/java/edu/rit/se/nvip/ReconcilerMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,8 @@ public static void main(String[] args) throws Exception {

ReconcilerController rc = new ReconcilerController(DatabaseHelper.getInstance(), filterHandler, reconciler, nvdController, mitreController);

try{
Messenger messenger = new Messenger(connectionFactory, inputQueueName, outputQueueName, rc);
messenger.run();
} catch (TimeoutException e) {
logger.error("Error occurred while sending the Reconciler message to RabbitMQ: {}", e.getMessage());
} catch (IOException e) {
logger.error(e.getMessage());
}
Messenger messenger = new Messenger(connectionFactory, inputQueueName, outputQueueName, rc);
messenger.run();
// case "dev":
// final Set<String> devJobs = new HashSet<>();
// devJobs.add("CVE-2023-2825");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public void run(){
}

logger.info("Waiting for jobs from Crawler...");
try(Connection connection = factory.newConnection();
Channel channel = connection.createChannel()){
try {
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(inputQueue, true, false, false, null);
channel.queueDeclare(outputQueue, true, false, false, null);

Expand Down Expand Up @@ -118,6 +119,7 @@ public void run(){
logger.error("Error occurred while sending the Reconciler message to RabbitMQ: {}", e.getMessage());
} catch (IOException e) {
logger.error(e.getMessage());
e.printStackTrace();
}
}

Expand Down
Loading