3 final class PhabricatorRebuildIndexesWorker
extends PhabricatorWorker
{
5 public static function rebuildObjectsWithQuery($query_class) {
9 'queryClass' => $query_class,
12 'priority' => parent
::PRIORITY_INDEX
,
16 protected function doWork() {
17 $viewer = PhabricatorUser
::getOmnipotentUser();
19 $data = $this->getTaskData();
20 $query_class = idx($data, 'queryClass');
23 $query = newv($query_class, array());
24 } catch (Exception
$ex) {
25 throw new PhabricatorWorkerPermanentFailureException(
27 'Unable to instantiate query class "%s": %s',
32 $query->setViewer($viewer);
34 $iterator = new PhabricatorQueryIterator($query);
35 foreach ($iterator as $object) {
36 PhabricatorSearchWorker
::queueDocumentForIndexing(