Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/worker/PhabricatorSearchWorker.php
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | protected function doWork() { | ||||
try { | try { | ||||
// Reload the object now that we have a lock, to make sure we have the | // Reload the object now that we have a lock, to make sure we have the | ||||
// most current version. | // most current version. | ||||
$object = $this->loadObjectForIndexing($object->getPHID()); | $object = $this->loadObjectForIndexing($object->getPHID()); | ||||
$engine->setObject($object); | $engine->setObject($object); | ||||
$engine->indexObject(); | $engine->indexObject(); | ||||
$engine->indexDocumentByPHID($object->getPHID()); | |||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
$lock->unlock(); | $lock->unlock(); | ||||
if (!($ex instanceof PhabricatorWorkerPermanentFailureException)) { | if (!($ex instanceof PhabricatorWorkerPermanentFailureException)) { | ||||
$ex = new PhabricatorWorkerPermanentFailureException( | $ex = new PhabricatorWorkerPermanentFailureException( | ||||
pht( | pht( | ||||
'Failed to update search index for document "%s": %s', | 'Failed to update search index for document "%s": %s', | ||||
$object_phid, | $object_phid, | ||||
Show All 28 Lines |