mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Fix an issue with URI index updates from the daemons
Summary: Ref T10923. This extension needs to load a little more data (with `needURIs`) to function correctly now. (There's a recent migration does this, so indexes got updated correctly when it ran, so it hasn't been obvious that they weren't getting updated properly after that.) Test Plan: Made an arbitrary edit to a repository, observed no more error in daemon logs. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10923 Differential Revision: https://secure.phabricator.com/D15908
This commit is contained in:
parent
e5f2ccc57f
commit
dc2d87059b
1 changed files with 12 additions and 0 deletions
|
@ -16,6 +16,18 @@ final class DiffusionRepositoryURIsIndexEngineExtension
|
|||
public function indexObject(
|
||||
PhabricatorIndexEngine $engine,
|
||||
$object) {
|
||||
|
||||
// Reload the repository to pick up URIs, which we need in order to update
|
||||
// the URI index.
|
||||
$object = id(new PhabricatorRepositoryQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withPHIDs(array($object->getPHID()))
|
||||
->needURIs(true)
|
||||
->executeOne();
|
||||
if (!$object) {
|
||||
return;
|
||||
}
|
||||
|
||||
$object->updateURIIndex();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue