Skip to content

Commit

Permalink
Finish sadu migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Feb 14, 2024
1 parent a2e9598 commit e9a2132
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/de/chojo/repbot/dao/access/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ public void cleanup() {
if (delete.changed()) {
log.debug("Deleted {} entries from analyzer log", delete.rows());
} else {
// TODO log error
log.error(LogNotify.NOTIFY_ADMIN, "Could not cleanup analyzer log.", delete);
delete.exceptions().forEach(e -> log.error(LogNotify.NOTIFY_ADMIN, "Could not cleanup analyzer log.", e));
}
delete = Query.query("DELETE FROM reputation_results WHERE submitted < now() - ?::INTERVAL")
.single(call().bind("%d HOURS".formatted(configuration.cleanup().analyzerLogHours())))
.delete();
if (delete.changed()) {
log.debug("Deleted {} entries from reputation results", delete.rows());
} else {
log.error(LogNotify.NOTIFY_ADMIN, "Could not cleanup analyzer log.", delete);
delete.exceptions().forEach(e -> log.error(LogNotify.NOTIFY_ADMIN, "Could not cleanup analyzer log.", e));
}
}
}

0 comments on commit e9a2132

Please sign in to comment.