Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/index/PhabricatorSearchIndexer.php
| Show All 9 Lines | PhabricatorWorker::scheduleTask( | ||||
| 'context' => $context, | 'context' => $context, | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'priority' => PhabricatorWorker::PRIORITY_IMPORT, | 'priority' => PhabricatorWorker::PRIORITY_IMPORT, | ||||
| )); | )); | ||||
| } | } | ||||
| public function indexDocumentByPHID($phid, $context) { | public function indexDocumentByPHID($phid, $context) { | ||||
| $indexers = id(new PhutilSymbolLoader()) | $indexers = id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass('PhabricatorSearchDocumentIndexer') | ->setAncestorClass('PhabricatorSearchDocumentIndexer') | ||||
| ->loadObjects(); | ->execute(); | ||||
| foreach ($indexers as $indexer) { | foreach ($indexers as $indexer) { | ||||
| if ($indexer->shouldIndexDocumentByPHID($phid)) { | if ($indexer->shouldIndexDocumentByPHID($phid)) { | ||||
| $indexer->indexDocumentByPHID($phid, $context); | $indexer->indexDocumentByPHID($phid, $context); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| } | } | ||||