Changeset 7464 for trunk


Ignore:
Timestamp:
01/30/06 17:03:05 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7463 r7464  
    1818
    1919                                                 -*-*- 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
    2028
    2129 2006/01/27 Thomas Bretz
  • trunk/MagicSoft/Mars/datacenter/macros/getdolist.C

    r7460 r7464  
    130130                    rc.GetValue(table+".TimerTable", ""),
    131131                    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());
    133133
    134134    TIter Next(&l);
  • trunk/MagicSoft/Mars/datacenter/macros/setstatus.C

    r7460 r7464  
    3333//
    3434// Usage:
    35 //   .x setstatus.C+("primary","table","column","value",kTRUE)
     35//  .x setstatus.C+("primary","table","column","statustime","failed","starttime","failedtime",kTRUE)
    3636// The first argument is the primary (date/run/sequence/dataset), the second
    3737// 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.
    4244//
    4345// Make sure, that database and password are corretly set in a resource
     
    6365
    6466
    65 Bool_t CheckReset(TEnv &rc, TString table, TString column, TString value)
     67Bool_t CheckReset(TEnv &rc, TString table, TString column, TString statustime)
    6668{
    67     if (value!="NULL")
     69    if (statustime!="NULL")
    6870    {
    6971        cout << "everything ok - no reset needed" << endl;
     
    113115}
    114116
    115 Int_t SetInfluences(MSQLServer &serv, TEnv &rc, TString primary, TString table, TString column, TString value, Bool_t resetall)
     117Int_t SetInfluences(MSQLServer &serv, TEnv &rc, TString primary, TString table, TString column, TString statustime, TString failed, TString starttime, TString failedtime, Bool_t resetall)
    116118{
    117119    cout << "set influenes for " << table << "." << column << endl;
     
    120122    TString influences  = rc.GetValue(table+"."+column+".Influences", "");
    121123
    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()));
    124127
    125128    while (!influences.IsNull() && resetall)
     
    157160}
    158161
    159 int setstatus(TString primary, TString table, TString column, TString value, Bool_t resetall=kTRUE)
     162int setstatus(TString primary, TString table, TString column, TString statustime, TString failed, TString starttime, TString failedtime, Bool_t resetall=kTRUE)
    160163{
    161164    TEnv env("sql.rc");
     
    176179
    177180    //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);
    179182
    180183}
Note: See TracChangeset for help on using the changeset viewer.