Improve logging for WhatsApp Reminders

This commit is contained in:
2026-06-28 19:45:29 +02:00
parent c5ebcabefe
commit a2d379100e
@@ -30,10 +30,13 @@ public class WhatsAppNotifier {
ArrayList<WhatsAppReminder> reminders = TippligaSQLConnector.getInstance().getNextWhatsAppReminders(24); ArrayList<WhatsAppReminder> reminders = TippligaSQLConnector.getInstance().getNextWhatsAppReminders(24);
reminders.addAll(TippligaSQLConnector.getInstance().getNextWhatsAppReminders(2)); reminders.addAll(TippligaSQLConnector.getInstance().getNextWhatsAppReminders(2));
reminders.forEach(reminder -> { reminders.forEach(reminder -> {
logger.info("Sende WhatsApp Erinnerung an " + reminder.username());
boolean success = sendMessage(reminder); boolean success = sendMessage(reminder);
if (success) { if (success) {
markReminderAsSent(reminder); markReminderAsSent(reminder);
logger.info("WhatsApp Erinnerung an " + reminder.username() + " gesendet."); logger.info("WhatsApp Erinnerung an " + reminder.username() + " gesendet.");
} else {
logger.error("WhatsApp Nachricht senden an " + reminder.username() + " fehlgeschlagen.");
} }
}); });
} }