add a workaround to already monitor job while calculating job size
authorBruno Sinou <bsinou@argeo.org>
Tue, 5 Mar 2013 19:43:45 +0000 (19:43 +0000)
committerBruno Sinou <bsinou@argeo.org>
Tue, 5 Mar 2013 19:43:45 +0000 (19:43 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@6101 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoSync.java

index eaddaf690adcf5b80e799cb1da739eacb917c7f9..91080ace6cbbcd832e9753e929cee4c2b1ee0d51 100644 (file)
@@ -125,6 +125,7 @@ public class RepoSync implements Runnable {
 
                        // Compute job size
                        if (monitor != null) {
+                               monitor.beginTask("Fetch", -1);
                                Long totalAmount = 0l;
                                if (sourceWkspList != null) {
                                        for (String wkspName : sourceWkspList) {
@@ -136,6 +137,7 @@ public class RepoSync implements Runnable {
                                                totalAmount += getNodesNumber(sourceWorkspaceName);
                                        }
                                monitor.beginTask("Fetch", totalAmount.intValue());
+
                                if (log.isDebugEnabled())
                                        log.debug("Nb of nodes to sync: " + totalAmount.intValue());
                        }