Indexing of stateEnterTime yet, disabled by default.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 12 Sep 2007 14:57:28 +0000 (14:57 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 12 Sep 2007 14:57:28 +0000 (14:57 +0000)
org.glite.lb.client-interface/interface/consumer.h
org.glite.lb.server/src/bkindex.c
org.glite.lb.server/src/jobstat_supp.c

index 880b750..e4de602 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_STATEENTERTIME,      /**< When entered current status */
        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 !! */
index ab1757b..6a2da89 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_STATEENTERTIME:
                case EDG_WLL_QUERY_ATTR_LASTUPDATETIME:
                        return "datetime null";
                default:
index 65854a1..9be51f1 100644 (file)
@@ -738,6 +738,9 @@ 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_STATEENTERTIME:
+                               data = strdup(edg_wll_TimeToDB(stat->pub.stateEnterTime.tv_sec));
+                               break;
                        case EDG_WLL_QUERY_ATTR_LASTUPDATETIME:
                                data = strdup(edg_wll_TimeToDB(stat->pub.lastUpdateTime.tv_sec));
                                break;