Enhancement: take into account the "periodicity" of the background processes.

Bug fix: fixed a warning in CheckStopWatchThresholds

SVN:trunk[2609]
This commit is contained in:
Denis Flaven
2013-03-01 17:14:54 +00:00
parent 9013910cec
commit eee8d71381
5 changed files with 193 additions and 13 deletions

View File

@@ -389,6 +389,7 @@ class CheckStopWatchThresholds implements iBackgroundProcess
{
foreach (MetaModel::GetClasses() as $sClass)
{
$aList = array();
foreach (MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
{
if ($oAttDef instanceof AttributeStopWatch)
@@ -400,7 +401,6 @@ class CheckStopWatchThresholds implements iBackgroundProcess
$sExpression = "SELECT $sClass WHERE {$sAttCode}_laststart AND {$sAttCode}_{$iThreshold}_triggered = 0 AND {$sAttCode}_{$iThreshold}_deadline < NOW()";
//echo $sExpression."<br/>\n";
$oFilter = DBObjectSearch::FromOQL($sExpression);
$aList = array();
$oSet = new DBObjectSet($oFilter);
while ((time() < $iTimeLimit) && ($oObj = $oSet->Fetch()))
{