- Timestamp:
- 01/30/06 17:03:05 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7463 r7464 18 18 19 19 -*-*- END OF LINE -*-*- 20 2006/01/30 Daniela Dorner 21 22 * datacenter/macros/setstatus.C, getdolist.C: 23 - adapted macros to the improvement of failure handling in the 24 automatic analysis (added columns fFailed, fStartTime, 25 fFailedTime) 26 27 20 28 21 29 2006/01/27 Thomas Bretz -
trunk/MagicSoft/Mars/datacenter/macros/getdolist.C
r7460 r7464 130 130 rc.GetValue(table+".TimerTable", ""), 131 131 rc.GetValue(table+".Primary", "")); 132 query+=Form(" WHERE ISNULL(%s) ", column.Data());132 query+=Form(" WHERE ISNULL(%s) AND ISNULL(fFailed) AND ISNULL(fStartTime) AND ISNULL(fFailedTime) ", column.Data()); 133 133 134 134 TIter Next(&l); -
trunk/MagicSoft/Mars/datacenter/macros/setstatus.C
r7460 r7464 33 33 // 34 34 // Usage: 35 // .x setstatus.C+("primary","table","column","value",kTRUE)35 // .x setstatus.C+("primary","table","column","statustime","failed","starttime","failedtime",kTRUE) 36 36 // The first argument is the primary (date/run/sequence/dataset), the second 37 37 // and third argument give the table and column of the step. The fourth 38 // column is giving the value, to which the column has to be set. The last 39 // argument is indicating if the columns of all influenced steps shall be 40 // reset to NULL. The default is kTRUE, which means, that the columns are 41 // reset. 38 // column is giving the statustime, to which the column has to be set. The 39 // fifth argument is giving the error code (in case of failure), the sixth 40 // the starttime and the seventh the stoptime (only in case of failure). 41 // The last argument is indicating if the columns of all influenced steps 42 // shall be reset to NULL. The default is kTRUE, which means, that the 43 // columns are reset. 42 44 // 43 45 // Make sure, that database and password are corretly set in a resource … … 63 65 64 66 65 Bool_t CheckReset(TEnv &rc, TString table, TString column, TString value)67 Bool_t CheckReset(TEnv &rc, TString table, TString column, TString statustime) 66 68 { 67 if ( value!="NULL")69 if (statustime!="NULL") 68 70 { 69 71 cout << "everything ok - no reset needed" << endl; … … 113 115 } 114 116 115 Int_t SetInfluences(MSQLServer &serv, TEnv &rc, TString primary, TString table, TString column, TString value, Bool_t resetall)117 Int_t SetInfluences(MSQLServer &serv, TEnv &rc, TString primary, TString table, TString column, TString statustime, TString failed, TString starttime, TString failedtime, Bool_t resetall) 116 118 { 117 119 cout << "set influenes for " << table << "." << column << endl; … … 120 122 TString influences = rc.GetValue(table+"."+column+".Influences", ""); 121 123 122 TString query(Form("UPDATE %s SET %s=%s", 123 table.Data(), column.Data(), value.Data())); 124 TString query(Form("UPDATE %s SET %s=%s, fFailed=%s, fStartTime=%s, fFailedTime=%s ", 125 table.Data(), column.Data(), statustime.Data(), failed.Data(), 126 starttime.Data(), failedtime.Data())); 124 127 125 128 while (!influences.IsNull() && resetall) … … 157 160 } 158 161 159 int setstatus(TString primary, TString table, TString column, TString value, Bool_t resetall=kTRUE)162 int setstatus(TString primary, TString table, TString column, TString statustime, TString failed, TString starttime, TString failedtime, Bool_t resetall=kTRUE) 160 163 { 161 164 TEnv env("sql.rc"); … … 176 179 177 180 //if reset is needed and/or can be done, set new values 178 return !CheckReset(rc, table, column, value) ? 0 : SetInfluences(serv, rc, primary, table, column, value, resetall);181 return !CheckReset(rc, table, column, statustime) ? 0 : SetInfluences(serv, rc, primary, table, column, statustime, failed, starttime, failedtime, resetall); 179 182 180 183 }
Note:
See TracChangeset
for help on using the changeset viewer.