Commit 9e39a9561bccd07ddf0f69bc666036407eb16327
1 parent
6261f1fa
The document is unqueued after all processors have run, irrespective of the outcome or mimetype.
PT: 1789294 Committed by: Megan Watson
Showing
1 changed file
with
6 additions
and
2 deletions
search2/documentProcessor/documentProcessor.inc.php
| @@ -246,6 +246,11 @@ class DocumentProcessor | @@ -246,6 +246,11 @@ class DocumentProcessor | ||
| 246 | global $default; | 246 | global $default; |
| 247 | $default->log->debug('documentProcessor: starting processing'); | 247 | $default->log->debug('documentProcessor: starting processing'); |
| 248 | 248 | ||
| 249 | + if($this->processors === false){ | ||
| 250 | + $default->log->info('documentProcessor: stopping - no processors enabled'); | ||
| 251 | + return ; | ||
| 252 | + } | ||
| 253 | + | ||
| 249 | // Get processing queue | 254 | // Get processing queue |
| 250 | // Use the same batch size as the indexer (for now) | 255 | // Use the same batch size as the indexer (for now) |
| 251 | // If the batch size is huge then reset it to a smaller number | 256 | // If the batch size is huge then reset it to a smaller number |
| @@ -286,9 +291,8 @@ class DocumentProcessor | @@ -286,9 +291,8 @@ class DocumentProcessor | ||
| 286 | // Process document | 291 | // Process document |
| 287 | $processor->setDocument($document); | 292 | $processor->setDocument($document); |
| 288 | $processor->processDocument(); | 293 | $processor->processDocument(); |
| 289 | - | ||
| 290 | - Indexer::unqueueDocFromProcessing($docId, "Document processed", 'debug'); | ||
| 291 | } | 294 | } |
| 295 | + Indexer::unqueueDocFromProcessing($docId, "Document processed", 'debug'); | ||
| 292 | } | 296 | } |
| 293 | } | 297 | } |
| 294 | 298 |