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 | 246 | global $default; |
| 247 | 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 | 254 | // Get processing queue |
| 250 | 255 | // Use the same batch size as the indexer (for now) |
| 251 | 256 | // If the batch size is huge then reset it to a smaller number |
| ... | ... | @@ -286,9 +291,8 @@ class DocumentProcessor |
| 286 | 291 | // Process document |
| 287 | 292 | $processor->setDocument($document); |
| 288 | 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 | ... | ... |