Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/engine/HarbormasterBuildGraph.php
Show All 19 Lines | public static function determineDependencyExecution( | ||||
if (count($steps) === 0) { | if (count($steps) === 0) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$graph = id(new HarbormasterBuildGraph($steps_by_phid)) | $graph = id(new HarbormasterBuildGraph($steps_by_phid)) | ||||
->addNodes($step_phids); | ->addNodes($step_phids); | ||||
$raw_results = | $raw_results = $graph->getNodesInRoughTopologicalOrder(); | ||||
$graph->getBestEffortTopographicallySortedNodes(); | |||||
$results = array(); | $results = array(); | ||||
foreach ($raw_results as $node) { | foreach ($raw_results as $node) { | ||||
$results[] = array( | $results[] = array( | ||||
'node' => $steps_by_phid[$node['node']], | 'node' => $steps_by_phid[$node['node']], | ||||
'depth' => $node['depth'], | 'depth' => $node['depth'], | ||||
'cycle' => $node['cycle'], | 'cycle' => $node['cycle'], | ||||
); | ); | ||||
Show All 30 Lines |