Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/index/PhabricatorSearchIndexer.php
| <?php | <?php | ||||
| final class PhabricatorSearchIndexer { | final class PhabricatorSearchIndexer { | ||||
| public function queueDocumentForIndexing($phid) { | public function queueDocumentForIndexing($phid) { | ||||
| PhabricatorWorker::scheduleTask( | PhabricatorWorker::scheduleTask( | ||||
| 'PhabricatorSearchWorker', | 'PhabricatorSearchWorker', | ||||
| array( | array( | ||||
| 'documentPHID' => $phid, | 'documentPHID' => $phid, | ||||
| ), | ), | ||||
| PhabricatorWorker::PRIORITY_IMPORT); | array( | ||||
| 'priority' => PhabricatorWorker::PRIORITY_IMPORT, | |||||
| )); | |||||
| } | } | ||||
| public function indexDocumentByPHID($phid) { | public function indexDocumentByPHID($phid) { | ||||
| $indexers = id(new PhutilSymbolLoader()) | $indexers = id(new PhutilSymbolLoader()) | ||||
| ->setAncestorClass('PhabricatorSearchDocumentIndexer') | ->setAncestorClass('PhabricatorSearchDocumentIndexer') | ||||
| ->loadObjects(); | ->loadObjects(); | ||||
| foreach ($indexers as $indexer) { | foreach ($indexers as $indexer) { | ||||
| Show All 10 Lines | |||||