Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/publisher/DivinerLivePublisher.php
Show All 34 Lines | if (!$this->book) { | ||||
'UPDATE %T SET repositoryPHID = %s WHERE bookPHID = %s', | 'UPDATE %T SET repositoryPHID = %s WHERE bookPHID = %s', | ||||
id(new DivinerLiveSymbol())->getTableName(), | id(new DivinerLiveSymbol())->getTableName(), | ||||
$this->getRepositoryPHID(), | $this->getRepositoryPHID(), | ||||
$book->getPHID()); | $book->getPHID()); | ||||
$conn_w->saveTransaction(); | $conn_w->saveTransaction(); | ||||
$this->book = $book; | $this->book = $book; | ||||
id(new PhabricatorSearchIndexer()) | PhabricatorSearchWorker::queueDocumentForIndexing($book->getPHID()); | ||||
->queueDocumentForIndexing($book->getPHID()); | |||||
} | } | ||||
return $this->book; | return $this->book; | ||||
} | } | ||||
private function loadSymbolForAtom(DivinerAtom $atom) { | private function loadSymbolForAtom(DivinerAtom $atom) { | ||||
$symbol = id(new DivinerAtomQuery()) | $symbol = id(new DivinerAtomQuery()) | ||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | foreach ($hashes as $hash) { | ||||
$summary = $renderer->getAtomSummary($atom); | $summary = $renderer->getAtomSummary($atom); | ||||
$symbol->setSummary($summary); | $symbol->setSummary($summary); | ||||
} else { | } else { | ||||
$symbol->setSummary(''); | $symbol->setSummary(''); | ||||
} | } | ||||
$symbol->save(); | $symbol->save(); | ||||
id(new PhabricatorSearchIndexer()) | PhabricatorSearchWorker::queueDocumentForIndexing($symbol->getPHID()); | ||||
->queueDocumentForIndexing($symbol->getPHID()); | |||||
// TODO: We probably need a finer-grained sense of what "documentable" | // TODO: We probably need a finer-grained sense of what "documentable" | ||||
// atoms are. Neither files nor methods are currently considered | // atoms are. Neither files nor methods are currently considered | ||||
// documentable, but for different reasons: files appear nowhere, while | // documentable, but for different reasons: files appear nowhere, while | ||||
// methods just don't appear at the top level. These are probably | // methods just don't appear at the top level. These are probably | ||||
// separate concepts. Since we need atoms in order to build method | // separate concepts. Since we need atoms in order to build method | ||||
// documentation, we insert them here. This also means we insert files, | // documentation, we insert them here. This also means we insert files, | ||||
// which are unnecessary and unused. Make sure this makes sense, but then | // which are unnecessary and unused. Make sure this makes sense, but then | ||||
Show All 18 Lines |