Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/DiffusionQuery.php
| Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | foreach ($bindings as $binding) { | ||||
| } | } | ||||
| } | } | ||||
| shuffle($uris); | shuffle($uris); | ||||
| $uri = head($uris); | $uri = head($uris); | ||||
| $domain = id(new PhutilURI(PhabricatorEnv::getURI('/')))->getDomain(); | $domain = id(new PhutilURI(PhabricatorEnv::getURI('/')))->getDomain(); | ||||
| // TODO: This call needs authentication, which is blocked by T5955. | $client = id(new ConduitClient($uri)) | ||||
| ->setHost($domain); | |||||
| return id(new ConduitClient($uri)) | $token = PhabricatorConduitToken::loadClusterTokenForUser($user); | ||||
| ->setHost($domain) | if ($token) { | ||||
| ->callMethodSynchronous($method, $params); | $client->setConduitToken($token->getToken()); | ||||
| } | |||||
| return $client->callMethodSynchronous($method, $params); | |||||
| } | } | ||||
| public function execute() { | public function execute() { | ||||
| return $this->executeQuery(); | return $this->executeQuery(); | ||||
| } | } | ||||
| abstract protected function executeQuery(); | abstract protected function executeQuery(); | ||||
| ▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines | |||||