Ignore:
Timestamp:
08/11/09 16:28:36 (15 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/db/include.php

    r9451 r9486  
    5050}
    5151
    52 function StatusQuery($name, $needs)
    53 {
     52function StatusQuery($name, $needs, $timelimits)
     53{
     54    if (empty($timelimits[$name]))
     55        $timelimit="12";
     56    else
     57        $timelimit=$timelimits[$name];
    5458    $var  = $name . "Status";
    5559    $txt  = "";
     
    6165    case 2: $txt .= "IsNull(" . $name . ") AND "; break; //not done no matter what status of previous step is
    6266    case 3: $txt .= $name ."='1970-01-01 00:00:00' AND "; break;
    63     case 4: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval 12 hour) < fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break;
     67    case 4: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval " . $timelimit . " hour) < fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break;
    6468    case 5: $txt .= " (IsNull(" . $name . ") AND NOT IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND NOT IsNull(" . $needs[$name] . ")) AND "; break;
    65     case 6: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval 12 hour) > fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break;
     69    case 6: $txt .= " (IsNull(" . $name . ") AND IsNull(fFailedTime) AND NOT IsNull(fStartTime) AND date_sub(Now(),interval " . $timelimit . " hour) > fStartTime AND NOT IsNull(" . $needs[$name] . ")) AND "; break;
    6670//    case 6: $txt .= "crashed"; break;
    6771    case 7: $txt .= ""; break;
Note: See TracChangeset for help on using the changeset viewer.