Differential D21532 Diff 51252 src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | foreach ($commits as $commit) { | ||||
// NOTE: With "--importing", we queue the first unparsed step and let | // NOTE: With "--importing", we queue the first unparsed step and let | ||||
// it queue the other ones normally. Without "--importing", we queue | // it queue the other ones normally. Without "--importing", we queue | ||||
// all the requested steps explicitly. | // all the requested steps explicitly. | ||||
$spec = array( | $spec = array( | ||||
'commitID' => $commit->getID(), | 'commitID' => $commit->getID(), | ||||
'only' => !$importing, | 'only' => !$importing, | ||||
'via' => 'reparse', | |||||
); | ); | ||||
foreach ($classes as $class) { | foreach ($classes as $class) { | ||||
try { | try { | ||||
PhabricatorWorker::scheduleTask( | PhabricatorWorker::scheduleTask( | ||||
$class, | $class, | ||||
$spec, | $spec, | ||||
array( | array( | ||||
'priority' => PhabricatorWorker::PRIORITY_IMPORT, | 'priority' => PhabricatorWorker::PRIORITY_IMPORT, | ||||
'objectPHID' => $commit->getPHID(), | |||||
'containerPHID' => $repository->getPHID(), | |||||
)); | )); | ||||
} catch (PhabricatorWorkerPermanentFailureException $ex) { | } catch (PhabricatorWorkerPermanentFailureException $ex) { | ||||
// See T13315. We expect some reparse steps to occasionally raise | // See T13315. We expect some reparse steps to occasionally raise | ||||
// permanent failures: for example, because they are no longer | // permanent failures: for example, because they are no longer | ||||
// reachable. This is a routine condition, not a catastrophic | // reachable. This is a routine condition, not a catastrophic | ||||
// failure, so let the user know something happened but continue | // failure, so let the user know something happened but continue | ||||
// reparsing any remaining commits. | // reparsing any remaining commits. | ||||
echo tsprintf( | echo tsprintf( | ||||
Show All 15 Lines |