New job state flags.
authorZdeněk Šustr <sustr4@cesnet.cz>
Thu, 16 Nov 2006 14:19:07 +0000 (14:19 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Thu, 16 Nov 2006 14:19:07 +0000 (14:19 +0000)
org.glite.lb.client-interface/interface/consumer.h
org.glite.lb.common/src/xml_conversions.c

index ed2084d..225206f 100644 (file)
@@ -241,6 +241,8 @@ int edg_wll_QueryJobsExtProxy(
 #define EDG_WLL_STAT_CLASSADS  1       /**< various job description fields */
 #define EDG_WLL_STAT_CHILDREN  2       /**< list of subjob JobId's */
 #define EDG_WLL_STAT_CHILDSTAT 4       /**< apply the flags recursively to subjobs */
+#define EDG_WLL_STAT_CHILDHIST_FAST 8          /**< partially complete histogram of child job states */
+#define EDG_WLL_STAT_CHILDHIST_THOROUGH 16     /**< full and up-to date histogram of child job states */
 /* starting from bit 10 private flags begins - do not add 1024 and more! */
 
 /** Return status of a single job.
index bbf833b..1701722 100644 (file)
@@ -720,6 +720,24 @@ char *edg_wll_stat_flags_to_string(int flags)
                 else asprintf(&cflags,"%s","no_states");
         }
 
+        if (flags & EDG_WLL_STAT_CHILDHIST_FAST) {
+                if (cflags) {
+                        asprintf(&temp_cflags,"%s+%s",cflags,"childhist_fast");
+                        free(cflags);
+                        cflags=temp_cflags;
+                }
+                else asprintf(&cflags,"%s","childhist_fast");
+        }
+
+        if (flags & EDG_WLL_STAT_CHILDHIST_THOROUGH) {
+                if (cflags) {
+                        asprintf(&temp_cflags,"%s+%s",cflags,"childhist_thorough");
+                        free(cflags);
+                        cflags=temp_cflags;
+                }
+                else asprintf(&cflags,"%s","childhist_thorough");
+        }
+
         if (!cflags) cflags = strdup("");
 
         return(cflags);
@@ -740,6 +758,8 @@ int edg_wll_string_to_stat_flags(char *cflags)
                if (!strcmp(sflag,"childstat")) flags = flags | EDG_WLL_STAT_CHILDSTAT;
                if (!strcmp(sflag,"no_jobs")) flags = flags | EDG_WLL_STAT_NO_JOBS;
                if (!strcmp(sflag,"no_states")) flags = flags | EDG_WLL_STAT_NO_STATES;
+                if (!strcmp(sflag,"childhist_fast")) flags = flags | EDG_WLL_STAT_CHILDHIST_FAST;
+                if (!strcmp(sflag,"childhist_thorough")) flags = flags | EDG_WLL_STAT_CHILDHIST_THOROUGH;
                sflag = strtok_r(NULL, "+", &last);
        }