From c390d05cc9469e6488f7a223da3657b2fa285572 Mon Sep 17 00:00:00 2001 From: Megan Watson Date: Thu, 7 Jan 2010 18:38:31 +0200 Subject: [PATCH] Added a process date flag to show the document is being processed. PT: 2100284 --- search2/indexing/indexerCore.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/search2/indexing/indexerCore.inc.php b/search2/indexing/indexerCore.inc.php index 3fc224c..eea51da 100755 --- a/search2/indexing/indexerCore.inc.php +++ b/search2/indexing/indexerCore.inc.php @@ -1344,6 +1344,17 @@ abstract class Indexer return; } + // identify any documents that need processing and flag them so they are not taken in a followup run + $ids = array(); + foreach($result as $docinfo) + { + $ids[] = $docinfo['document_id']; + } + + $ids=implode(',',$ids); + $sql = "UPDATE process_queue SET date_processed=NOW() WHERE document_id in ($ids)"; + DBUtil::runQuery($sql); + return $result; } -- libgit2 0.21.4