Changeset 7323


Ignore:
Timestamp:
08/27/05 21:25:15 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/getdolist.C

    r7285 r7323  
    113113    query+=Form(" ORDER BY %s.%s DESC ", table.Data(), rc.GetValue(table+".Primary", ""));
    114114
    115     if (table=="RunProcessStatus")
    116         query+="LIMIT 0, 500";
     115//    if (table=="RunProcessStatus")
     116//        query+="LIMIT 0, 500";
    117117
    118118    cout << "query: " << query << endl;
     
    129129    TSQLRow *row=0;
    130130
    131     if ((table=="SequenceProcessStatus" && column=="fCallisto") ||
    132         (table=="SequenceProcessStatus" && column=="fStar") ||
    133         (table=="DataSetProcessStatus" && column=="fGanymed"))
     131    if ((table=="SequenceProcessStatus" && column=="fCallisto")      ||
     132        (table=="SequenceProcessStatus" && column=="fStar")          ||
     133        (table=="RunProcessStatus"      && column=="fDataCheckDone") ||
     134        (table=="DataSetProcessStatus"  && column=="fGanymed"))
    134135    {
    135136        while ((row = res->Next()))
  • trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck

    r7322 r7323  
    4040year=`date +%Y`
    4141
    42 todofile=$listpath/ToDo-$table-$column.txt
     42todofile=$listpath/ToDo-$table-$column
    4343getstatuslogpath=$logpath/getstatus/dodatacheck/$year
    4444getstatuslog=$getstatuslogpath/getstatus-dodatacheck-$datetime.log
     
    5353makedir $getstatuslogpath >> $scriptlog 2>&1
    5454
    55 lockfile=$lockpath/lock-dodatacheck.txt
    56 date > $lockfile >> $scriptlog 2>&1
    57 checklock0=$?
    58 case $checklock0 in
    59     0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    60     1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    61          echo "-> for datacheck is running -> exit" >> $scriptlog 2>&1
    62          date  >> $scriptlog 2>&1
    63          exit;;
    64     *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
     55echo "checking if other todo-files are there" >> $scriptlog 2>&1
     56if  ls $todofile-[1-9]*.txt >> $scriptlog 2>&1
     57then
     58   echo "other file(s) on disk " >> $scriptlog 2>&1
     59   echo " -> choose one file and start calibrating" >> $scriptlog 2>&1
     60else
     61   date > $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1
     62   checklock0=$?
     63   case $checklock0 in
     64       0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
     65       1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
     66            echo "-> getting list for dodatacheck is running -> exit" >> $scriptlog 2>&1
     67            date  >> $scriptlog 2>&1
     68            exit;;
     69       *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
     70   esac
     71
     72   if  ls $todofile-[1-9]*.txt >> $scriptlog 2>&1
     73   then
     74      echo "other file(s) on disk " >> $scriptlog 2>&1
     75      echo " -> choose one file and start datacheck" >> $scriptlog 2>&1
     76   else
     77      echo "getting list..." >> $scriptlog 2>&1
     78      check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
     79
     80      case $check0 in
     81          1)   echo "check0=$check0 -> everything ok -> do datacheck" >> $scriptlog 2>&1;;
     82          *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     83      esac
     84   fi
     85   rm -v $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1
     86fi
     87
     88
     89nr=bla
     90echo "finding the right todo-file" >> $scriptlog 2>&1
     91todofiles=`ls -r $listpath/ToDo-$table-$column-*`
     92
     93echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&1
     94
     95for todofile in ${todofiles[@]}
     96do
     97   if ! ls $todofile >> $scriptlog 2>&1
     98   then
     99      echo "file is not on disk -> continue" >> $scriptlog 2>&1
     100      continue
     101   fi
     102   lockfile=`echo $todofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'`
     103   date > $lockfile >> $scriptlog 2>&1
     104   checklock=$?
     105   case $checklock in
     106       0)   echo "checklock=$checklock -> setting number" >> $scriptlog 2>&1
     107            nr=${i}
     108            break;;
     109       1)   echo "checklock=$checklock -> file exists -> continue" >> $scriptlog 2>&1;;
     110       *)   echo "checklock=$checklock -> something went completely wrong" >> $scriptlog 2>&1;;
     111   esac
     112done
     113
     114case $nr in
     115   bla)      echo "everything is beeing processed -> exit" >> $scriptlog 2>&1
     116             date  >> $scriptlog 2>&1
     117             exit;;
     118   12345678) echo "process nr: "$nr >> $scriptlog 2>&1;;
    65119esac
    66120
    67 
    68 echo "getting list..." >> $scriptlog 2>&1
    69 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    70 
    71 case $check0 in
    72    1)   echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1
    73         ;;
    74    *)   echo "check0=$check0 -> ERROR -> no todofile -> exit " >> $scriptlog 2>&1
    75         rm -v $lockfile >> $scriptlog 2>&1
    76         date  >> $scriptlog 2>&1
    77         exit
    78         ;;
    79 esac
    80121
    81122runs=(`cat $todofile`)
     
    139180               continue 2;;
    140181      esac
     182      check2=1
    141183   done
    142184   
     
    145187   fillsinopelogfile=$fillsinopepath/fillsinope-$no2.log
    146188
    147    echo "doing filldotraw..." >> $scriptlog 2>&1
     189   echo "doing fillsinope..." >> $scriptlog 2>&1
    148190   check3=`root -q -b $macrospath/fillsinope.C+\($run\,"\"$datapath\""\,kFALSE\) | tee $fillsinopelogfile | grep int | sed -e 's/.*(int)//'`
    149191
    150192   case $check3 in
    151        1)   echo "check3=$check3 -> everything ok -> set status..." >> $scriptlog 2>&1
     193       1)   echo "check3=$check3 -> everything ok -> set exclusions..." >> $scriptlog 2>&1
    152194            ;;
    153195       *)   echo "check3=$check3 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
Note: See TracChangeset for help on using the changeset viewer.