New indexed column - lastUpdateTime.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 12 Sep 2007 14:01:30 +0000 (14:01 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 12 Sep 2007 14:01:30 +0000 (14:01 +0000)
org.glite.lb.client-interface/interface/consumer.h
org.glite.lb.server/config/glite-lb-index.conf.template
org.glite.lb.server/src/bkindex.c
org.glite.lb.server/src/jobstat_supp.c
org.glite.lb/project/status.T

index 2e5d47d..880b750 100644 (file)
@@ -60,6 +60,7 @@ typedef enum _edg_wll_QueryAttr{
        EDG_WLL_QUERY_ATTR_PARENT,      /**< Job was resubmitted */
        EDG_WLL_QUERY_ATTR_EXITCODE,    /**< Unix exit code */
        EDG_WLL_QUERY_ATTR_JDL_ATTR,    /**< Arbitrary JDL attribute */
+       EDG_WLL_QUERY_ATTR_LASTUPDATETIME,      /**< Time of the last known event of the job */
        EDG_WLL_QUERY_ATTR__LAST
 /*     if adding new attribute, add conversion string to common/xml_conversions.c too !! */
 } edg_wll_QueryAttr;
index 594681b..915df1f 100644 (file)
@@ -2,6 +2,7 @@
        JobIndices = {
                [ type = "system"; name = "owner" ],
                [ type = "system"; name = "location" ],
-               [ type = "system"; name = "destination" ]
+               [ type = "system"; name = "destination" ],
+               [ type = "system"; name = "lastUpdateTime" ]
        }
 ]
index 153d6b0..ab1757b 100644 (file)
@@ -284,6 +284,7 @@ static char *db_col_type(const edg_wll_QueryRec *r)
                        return "varchar(255) binary null"; 
 
                case EDG_WLL_QUERY_ATTR_TIME:
+               case EDG_WLL_QUERY_ATTR_LASTUPDATETIME:
                        return "datetime null";
                default:
                        return NULL;
index 28c35ba..db04b4c 100644 (file)
@@ -738,6 +738,10 @@ edg_wll_ErrorCode edg_wll_IColumnsSQLPart(edg_wll_Context ctx,
                        case EDG_WLL_QUERY_ATTR_RESUBMITTED:
                                asprintf(&data, "%d", stat->pub.resubmitted);
                                break;
+                       case EDG_WLL_QUERY_ATTR_LASTUPDATETIME:
+                               data = strdup(edg_wll_TimeToDB(stat->pub.lastUpdateTime.tv_sec));
+                               printf("lastupdatedb: %s\n", data);
+                               break;
 
                                /* XXX add more attributes when defined */
                        default:
index f58d047..40428f2 100644 (file)
@@ -61,6 +61,7 @@ taglist       user_tags       List of pairs (user_tag, user_value)
 
 timeval        stateEnterTime  When entered this status
 timeval        lastUpdateTime  Last known event of the job
+_index_
 
 intlist        stateEnterTimes When all previous states were entered
        _special_       XMLstructured