incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r982264 - /sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/servlets/BackgroundTestServlet.java
Date Wed, 04 Aug 2010 14:32:08 GMT
Author: bdelacretaz
Date: Wed Aug  4 14:32:07 2010
New Revision: 982264

URL: http://svn.apache.org/viewvc?rev=982264&view=rev
Log:
SLING-550 - correctly update completion time if restarted after being suspended

Modified:
    sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/servlets/BackgroundTestServlet.java

Modified: sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/servlets/BackgroundTestServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/servlets/BackgroundTestServlet.java?rev=982264&r1=982263&r2=982264&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/servlets/BackgroundTestServlet.java
(original)
+++ sling/trunk/contrib/extensions/bgservlets/src/main/java/org/apache/sling/bgservlets/impl/servlets/BackgroundTestServlet.java
Wed Aug  4 14:32:07 2010
@@ -79,6 +79,8 @@ public class BackgroundTestServlet exten
                 
                 if(runtimeState != null) {
                     runtimeState.setProgressMessage(msg);
+                    final int remainingCycles = cycles - i;
+                    runtimeState.setEstimatedCompletionTime(new Date(System.currentTimeMillis()
+ remainingCycles * interval));
                 }
                 
                 try {



Mime
View raw message