Let --other purge jobs in all states except aborted, cleared, cancelled and done...
authorZdeněk Šustr <sustr4@cesnet.cz>
Wed, 18 Mar 2009 16:43:32 +0000 (16:43 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Wed, 18 Mar 2009 16:43:32 +0000 (16:43 +0000)
org.glite.lb.utils/src/purge.c

index 29214d2..4248528 100644 (file)
@@ -168,7 +168,15 @@ int main(int argc,char *argv[])
                                usage(me);
                                return 1;
                        }
-                       if (timeout >= 0) request->timeout[EDG_WLL_PURGE_JOBSTAT_OTHER]= timeout;
+                       if (timeout >= 0) 
+                               for (i = 0 ; i<EDG_WLL_NUMBER_OF_STATCODES ; i++) {
+                                       if ((i == EDG_WLL_JOB_ABORTED) ||
+                                               (i == EDG_WLL_JOB_CLEARED) ||
+                                               (i == EDG_WLL_JOB_CANCELLED) ||
+                                               (i == EDG_WLL_JOB_DONE)) continue;
+
+                                       request->timeout[i]= timeout;
+                               }
                        break;
 
                case 'm': server = optarg; break;