incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1479919 - /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/timed/TimedEventSender.java
Date Tue, 07 May 2013 14:27:41 GMT
Author: cziegeler
Date: Tue May  7 14:27:41 2013
New Revision: 1479919

URL: http://svn.apache.org/r1479919
Log:
SLING-2829 : Don't remove timed event if it's in the past

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/timed/TimedEventSender.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/timed/TimedEventSender.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/timed/TimedEventSender.java?rev=1479919&r1=1479918&r2=1479919&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/timed/TimedEventSender.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/timed/TimedEventSender.java
Tue May  7 14:27:41 2013
@@ -313,16 +313,10 @@ public class TimedEventSender
                     localScheduler.addPeriodicJob(scheduleInfo.jobId, this, config, scheduleInfo.period,
false);
                 } else {
                     // then it must be date
-                    if ( scheduleInfo.date.getTime() <= System.currentTimeMillis() ) {
-                        // obsolete date, remove it
-                        this.removeEvent(scheduleInfo);
-                        return true;
-                    } else {
-                        if ( this.logger.isDebugEnabled() ) {
-                            this.logger.debug("Adding timed event " + config.get(JOB_TOPIC)
+ "(" + scheduleInfo.jobId + ")" + " with date " + scheduleInfo.date);
-                        }
-                        localScheduler.fireJobAt(scheduleInfo.jobId, this, config, scheduleInfo.date);
+                    if ( this.logger.isDebugEnabled() ) {
+                        this.logger.debug("Adding timed event " + config.get(JOB_TOPIC) +
"(" + scheduleInfo.jobId + ")" + " with date " + scheduleInfo.date);
                     }
+                    localScheduler.fireJobAt(scheduleInfo.jobId, this, config, scheduleInfo.date);
                 }
                 this.startedSchedulerJobs.add(scheduleInfo.jobId);
                 return true;



Mime
View raw message