Improve logging for WhatsApp Reminders
This commit is contained in:
@@ -30,10 +30,13 @@ public class WhatsAppNotifier {
|
||||
ArrayList<WhatsAppReminder> reminders = TippligaSQLConnector.getInstance().getNextWhatsAppReminders(24);
|
||||
reminders.addAll(TippligaSQLConnector.getInstance().getNextWhatsAppReminders(2));
|
||||
reminders.forEach(reminder -> {
|
||||
logger.info("Sende WhatsApp Erinnerung an " + reminder.username());
|
||||
boolean success = sendMessage(reminder);
|
||||
if (success) {
|
||||
markReminderAsSent(reminder);
|
||||
logger.info("WhatsApp Erinnerung an " + reminder.username() + " gesendet.");
|
||||
} else {
|
||||
logger.error("WhatsApp Nachricht senden an " + reminder.username() + " fehlgeschlagen.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user