Differential D20588 Diff 49107 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 246 Lines • ▼ Show 20 Lines | foreach ($commits as $commit) { | ||||
// all the requested steps explicitly. | // all the requested steps explicitly. | ||||
$spec = array( | $spec = array( | ||||
'commitID' => $commit->getID(), | 'commitID' => $commit->getID(), | ||||
'only' => !$importing, | 'only' => !$importing, | ||||
); | ); | ||||
foreach ($classes as $class) { | foreach ($classes as $class) { | ||||
try { | |||||
PhabricatorWorker::scheduleTask( | PhabricatorWorker::scheduleTask( | ||||
$class, | $class, | ||||
$spec, | $spec, | ||||
array( | array( | ||||
'priority' => PhabricatorWorker::PRIORITY_IMPORT, | 'priority' => PhabricatorWorker::PRIORITY_IMPORT, | ||||
)); | )); | ||||
} catch (PhabricatorWorkerPermanentFailureException $ex) { | |||||
// See T13315. We expect some reparse steps to occasionally raise | |||||
// permanent failures: for example, because they are no longer | |||||
// reachable. This is a routine condition, not a catastrophic | |||||
// failure, so let the user know something happened but continue | |||||
// reparsing any remaining commits. | |||||
echo tsprintf( | |||||
"<bg:yellow>** %s **</bg> %s\n", | |||||
pht('WARN'), | |||||
$ex->getMessage()); | |||||
} | |||||
} | } | ||||
$progress->update(1); | $progress->update(1); | ||||
} | } | ||||
$progress->done(); | $progress->done(); | ||||
return 0; | return 0; | ||||
} | } | ||||
} | } |