etreschenkov 2025-12-05 12:57:37 +03:00
parent 51e6bb05c9
commit 6d582efa16

View file

@ -85,7 +85,8 @@ public class MonitoringService {
private void monitor() { private void monitor() {
try { try {
log.info("Start monitoring"); log.info("Start monitoring");
List<UserPackage> packages = userPackageMapper.findAllPackagesByStatus(Status.ON_MONITORING.name()); List<UserPackage> packages = userPackageMapper.findAllPackagesByStatus(Status.ON_MONITORING.name(),
Status.PROCESSING_REPEATED.name());
for (UserPackage userPackage : packages) { for (UserPackage userPackage : packages) {
MDC.put("ru.nbch.credit_tracker.log.mdc.key", "[" + userPackage.getPackageName() + "]"); MDC.put("ru.nbch.credit_tracker.log.mdc.key", "[" + userPackage.getPackageName() + "]");
processPackage(userPackage); processPackage(userPackage);
@ -103,7 +104,7 @@ public class MonitoringService {
log.info("Package has no fids. Package will be skipped."); log.info("Package has no fids. Package will be skipped.");
return; return;
} }
SgnlOnlineReport onlineReports = signalRestService.getReports(userPackage.getUserId() + "_" + userPackage.getPackageName()); SgnlOnlineReport onlineReports = signalRestService.getReports(userPackage.getUserId().substring(0, 6) + "_" + userPackage.getPackageName());
if (onlineReports == null) { if (onlineReports == null) {
log.info("No reports found for package"); log.info("No reports found for package");