Displaying differences for changeset
 
display as  

src/csip/Config.java

@@ -105,7 +105,7 @@
         /* 
          The CSIP version
          */
-        put("csip.version", "$version: 2.1.19 ef68eeef9b91 2016-04-05 od, built at 2016-04-07 10:04 by od$");
+        put("csip.version", "$version: 2.1.22 b50ffe381a06 2016-04-07 od, built at 2016-04-07 10:14 by od$");
 
         /*
          * The runtime architecture. 

src/csip/ModelDataService.java

@@ -2534,14 +2534,14 @@
                     // archive management
                     new Thread(() -> {
                         if (Config.isArchiveEnabled()) {
-                            if ((Config.getBoolean("csip.archive.failedonly") && serviceError != null)
-                                    || !Config.getBoolean("csip.archive.failedonly")) {
+                            if ((Config.getBoolean("csip.archive.failedonly") && serviceError != null)      // only archive if failed
+                                    || !Config.getBoolean("csip.archive.failedonly")) {                      // always archive
                                 try {
                                     long st = System.currentTimeMillis();
                                     // close log before archiving.
                                     LOG.close();
                                     // copy back the files to the workspace to make them 
-                                    // a part o fthe archive
+                                    // a part of the archive
                                     File req = new File(getResultsDir(), REQUEST_FILE);
                                     if (req.exists()) {
                                         FileUtils.copyFileToDirectory(req, getWorkspaceDir());
@@ -2578,7 +2578,7 @@
                         }
 
                         // separate therad
-                        Sweeper r = new Sweeper(ws, hasResultsDir() ? getResultsDir() : null, suid);
+                        Sweeper r = new Sweeper(hasResultsDir() ? getResultsDir() : null, suid);
                         if (ms.getStatus().equals(FAILED)) {
                             keepResults = Dates.getDurationSec("csip.session.ttl.failed");
                         } else if (ms.getStatus().equals(CANCELED)) {

src/csip/Sweeper.java

@@ -30,12 +30,10 @@
 class Sweeper extends TimerTask {
 
     File resultsDir;
-    File workspaceDir;
     String suid;
 
 
-    Sweeper(File workspaceDir, File resultsDir, String suid) {
-        this.workspaceDir = workspaceDir;
+    Sweeper(File resultsDir, String suid) {
         this.resultsDir = resultsDir;
         this.suid = suid;
     }
@@ -53,8 +51,5 @@
         if (resultsDir != null && resultsDir.exists()) {
             FileUtils.deleteQuietly(resultsDir);
         }
-//        if (workspaceDir != null && workspaceDir.exists()) {
-//            FileUtils.deleteQuietly(workspaceDir);
-//        }
     }
 }