Skip to content
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package edu.suffolk.litlab.efsp.server.logging;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.AppenderBase;
import ch.qos.logback.core.encoder.Encoder;
Expand Down Expand Up @@ -57,9 +56,6 @@ public void append(ILoggingEvent event) {
} finally {
lock.unlock();
}
if (event.getLevel().equals(Level.ERROR)) {
Monitor.sendErrorNotification(event.getFormattedMessage());
}
}

public Encoder<ILoggingEvent> getEncoder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
import edu.suffolk.litlab.efsp.Jurisdiction;
import edu.suffolk.litlab.efsp.db.DatabaseCreator;
import edu.suffolk.litlab.efsp.server.logging.MDCWrappers;
import edu.suffolk.litlab.efsp.server.logging.Monitor;
import edu.suffolk.litlab.efsp.tyler.TylerClients;
import edu.suffolk.litlab.efsp.tyler.ecfcodes.CodeDatabase;
import edu.suffolk.litlab.efsp.tyler.ecfcodes.CodeUpdater;
import java.sql.Connection;
import java.sql.SQLException;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
Expand All @@ -23,17 +19,6 @@
public class UpdateCodeVersions implements Job {
private static Logger log = LoggerFactory.getLogger(UpdateCodeVersions.class);

private static final String badUpdateEmailTemplate =
"""
Something's wrong with the EfileProxy. On the {{external_server}} server, `UpdateCodeVersions`
has failed to refresh the downloaded genericodes for the jurisdiction {{jurisdiction}} (env: {{env}}).
Unfortunately We can't send the potential problems in this message yet, but check the logs around
{{error_timestamp}}.

Good luck, lol.
- The EfileProxyServer
""";

/**
* A very light wrapper around the CLI CodeUpdater tool. A separate Job is started for each
* jurisdiction, so only jurisdiction and Tyler env is passed through.
Expand Down Expand Up @@ -62,18 +47,7 @@ public void execute(JobExecutionContext context) throws JobExecutionException {
}
log.info("Finished code updates with status: {}", success);
if (!success) {
Monitor.sendImmediateErrorNotification(
"UpdateCodeVersions error on " + Monitor.EXTERNAL_DOMAIN,
badUpdateEmailTemplate,
Map.of(
"external_server",
ServiceHelpers.EXTERNAL_URL,
"jurisdiction",
jurisdiction,
"env",
TylerClients.getTylerEnv(),
"error_timestamp",
LocalDate.now().toString()));
log.error("UpdateCodeVersions error, failed to refresh the downloaded genericodes");
}
MDCWrappers.removeAllMDCs();
}
Expand Down
Loading