implemented scheduled worker that processes queued notifications

This commit is contained in:
2026-01-13 16:42:31 +01:00
parent bef418d77d
commit 06aa0ce3cc
14 changed files with 225 additions and 104 deletions
@@ -42,11 +42,19 @@ public class Notification {
@Column(nullable = false)
@Enumerated(EnumType.STRING)
private NotificationStatus status;
private NotificationStatus status = NotificationStatus.PENDING;
/**
* Number of retry attempts made to send this notification.
*/
@Column(nullable = false)
private int retryCount;
private int failedSendAttempts = 0;
@Column(nullable = false)
private LocalDateTime createdAt;
public void incrementFailedSendAttempts() {
this.failedSendAttempts++;
}
}