Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/publisher/DivinerLivePublisher.php
| Show All 12 Lines | if (!$this->book) { | ||||
| $book = id(new DivinerLiveBook()) | $book = id(new DivinerLiveBook()) | ||||
| ->setName($book_name) | ->setName($book_name) | ||||
| ->setViewPolicy(PhabricatorPolicies::POLICY_USER) | ->setViewPolicy(PhabricatorPolicies::POLICY_USER) | ||||
| ->save(); | ->save(); | ||||
| } | } | ||||
| $book->setConfigurationData($this->getConfigurationData())->save(); | $book->setConfigurationData($this->getConfigurationData())->save(); | ||||
| $this->book = $book; | $this->book = $book; | ||||
| id(new PhabricatorSearchIndexer()) | |||||
| ->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 88 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()) | |||||
| ->queueDocumentForIndexing($symbol->getPHID()); | |||||
joshuaspence: Maybe we can make this smarter? I run Diviner on a cron on our install, so this will certainly… | |||||
| // 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 | ||||
| // probably introduce separate "isTopLevel" and "isDocumentable" flags? | // probably introduce separate "isTopLevel" and "isDocumentable" flags? | ||||
| Show All 18 Lines | |||||
Maybe we can make this smarter? I run Diviner on a cron on our install, so this will certainly keep the daemons busy.