Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | abstract class ArcanistWorkflow extends Phobject { | ||||
| private $changeCache = array(); | private $changeCache = array(); | ||||
| private $conduitEngine; | private $conduitEngine; | ||||
| private $toolset; | private $toolset; | ||||
| private $runtime; | private $runtime; | ||||
| private $configurationEngine; | private $configurationEngine; | ||||
| private $configurationSourceList; | private $configurationSourceList; | ||||
| private $hardpointEngine; | |||||
| final public function setToolset(ArcanistToolset $toolset) { | final public function setToolset(ArcanistToolset $toolset) { | ||||
| $this->toolset = $toolset; | $this->toolset = $toolset; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| final public function getToolset() { | final public function getToolset() { | ||||
| return $this->toolset; | return $this->toolset; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,237 Lines • ▼ Show 20 Lines | /* -( Phabricator Repositories )------------------------------------------- */ | ||||
| } | } | ||||
| final public function newCommand(PhutilExecutableFuture $future) { | final public function newCommand(PhutilExecutableFuture $future) { | ||||
| return id(new ArcanistCommand()) | return id(new ArcanistCommand()) | ||||
| ->setLogEngine($this->getLogEngine()) | ->setLogEngine($this->getLogEngine()) | ||||
| ->setExecutableFuture($future); | ->setExecutableFuture($future); | ||||
| } | } | ||||
| final protected function loadHardpoints( | |||||
| array $objects, | |||||
| array $requests) { | |||||
| $engine = $this->getHardpointEngine(); | |||||
| $requests = $engine->requestHardpoints( | |||||
| $objects, | |||||
| $requests); | |||||
| // TODO: Wait for only the required requests. | |||||
| $engine->waitForRequests(array()); | |||||
| } | |||||
| private function getHardpointEngine() { | |||||
| if ($this->hardpointEngine === null) { | |||||
| $this->hardpointEngine = $this->newHardpointEngine(); | |||||
| } | |||||
| return $this->hardpointEngine; | |||||
| } | |||||
| private function newHardpointEngine() { | |||||
| $engine = new ArcanistHardpointEngine(); | |||||
| $queries = ArcanistWorkflowHardpointQuery::getAllQueries(); | |||||
| foreach ($queries as $key => $query) { | |||||
| $queries[$key] = id(clone $query) | |||||
| ->setWorkflow($this); | |||||
| } | |||||
| $engine->setQueries($queries); | |||||
| return $engine; | |||||
| } | |||||
| } | } | ||||