From 1c1290de0b7a258ae15c614c2304e69971d578a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Thu, 25 Jan 2024 17:23:23 +0100 Subject: [PATCH] minor changes --- .../xbib/event/timer/TimerEventManagerService.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/event-common/src/main/java/org/xbib/event/timer/TimerEventManagerService.java b/event-common/src/main/java/org/xbib/event/timer/TimerEventManagerService.java index 509b89a..451efc6 100644 --- a/event-common/src/main/java/org/xbib/event/timer/TimerEventManagerService.java +++ b/event-common/src/main/java/org/xbib/event/timer/TimerEventManagerService.java @@ -29,7 +29,6 @@ public class TimerEventManagerService implements EventManagerService { public TimerEventManagerService() { } - @SuppressWarnings("unchecked") @Override public TimerEventManagerService init(EventManager eventManager) { Settings settings = eventManager.getSettings(); @@ -50,22 +49,22 @@ public class TimerEventManagerService implements EventManagerService { return this; } - public boolean publish(String service, + public boolean publish(String name, String timeSpec, Payload payload) throws ParseException, IOException { - if (services.containsKey(service)) { + if (services.containsKey(name)) { Span span = Chronic.parse(timeSpec); if (span != null) { ZonedDateTime zonedDateTime = span.getBeginCalendar(); - services.get(service).schedule(zonedDateTime.toInstant(), payload); + services.get(name).schedule(zonedDateTime.toInstant(), payload); logger.log(Level.INFO, "scheduled to " + zonedDateTime); } else { - logger.log(Level.INFO, "timer event key " + service + ": can not understand time spec " + timeSpec); + logger.log(Level.INFO, "timer event key " + name + ": can not understand time spec " + timeSpec); return false; } return true; } else { - logger.log(Level.SEVERE, "unknown timer event key: " + service); + logger.log(Level.SEVERE, "unknown timer event key: " + name); } return false; }