mirror of
https://github.com/theotherp/nzbhydra2.git
synced 2026-02-06 03:06:54 +00:00
Truncate notifications when saving to db
Some checks are pending
system-test / waitForNative (push) Waiting to run
system-test / buildMockserver (push) Waiting to run
system-test / runSystemTestsLinux (map[name:core port:5076]) (push) Blocked by required conditions
system-test / runSystemTestsLinux (map[name:v1Migration port:5077]) (push) Blocked by required conditions
system-test / runSystemTestsWindows (push) Blocked by required conditions
Some checks are pending
system-test / waitForNative (push) Waiting to run
system-test / buildMockserver (push) Waiting to run
system-test / runSystemTestsLinux (map[name:core port:5076]) (push) Blocked by required conditions
system-test / runSystemTestsLinux (map[name:v1Migration port:5077]) (push) Blocked by required conditions
system-test / runSystemTestsWindows (push) Blocked by required conditions
Closes #1040
This commit is contained in:
parent
440d337415
commit
d72623435a
@ -13,7 +13,10 @@
|
||||
"Bash(mvn test:*)",
|
||||
"Bash(mvn help:describe:*)",
|
||||
"mcp__github__get_commit",
|
||||
"Bash(findstr:*)"
|
||||
"Bash(findstr:*)",
|
||||
"Bash(dir \"c:\\\\temp\\\\hydrastats\")",
|
||||
"Bash(gh issue view:*)",
|
||||
"Bash(gh api:*)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@ -97,7 +97,8 @@ public class NotificationHandler {
|
||||
throw new RuntimeException("Unable to generate notification body", e);
|
||||
}
|
||||
|
||||
notificationRepository.save(new NotificationEntity(event.getEventType(), NotificationMessageType.valueOf(configEntry.getMessageType().name()), notificationTitle, notificationBody, configEntry.getAppriseUrls(), Instant.now()));
|
||||
final String truncatedBody = notificationBody.length() > 255 ? notificationBody.substring(0, 255) : notificationBody;
|
||||
notificationRepository.save(new NotificationEntity(event.getEventType(), NotificationMessageType.valueOf(configEntry.getMessageType().name()), notificationTitle, truncatedBody, configEntry.getAppriseUrls(), Instant.now()));
|
||||
|
||||
if (notificationConfig.getAppriseType() == NotificationConfig.AppriseType.NONE) {
|
||||
logger.debug(LoggingMarkers.NOTIFICATIONS, "Apprise type set to None");
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
#@formatter:off
|
||||
- version: "v8.3.1"
|
||||
date: "2026-01-30"
|
||||
changes:
|
||||
- type: "fix"
|
||||
text: "Truncate notification body to 255 characters before saving to database to prevent DataIntegrityViolationException causing massive log files. See #1040"
|
||||
- version: "v8.3.0"
|
||||
date: "2026-01-16"
|
||||
changes:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user