mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
When a worker task fails permanently, log the reason
Summary: Ref T6238. This makes debugging permanent task failures easier (we log reasoning for temporary failures already, just not permanent ones). Test Plan: Saw more useful permanent failure log. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T6238 Differential Revision: https://secure.phabricator.com/D10945
This commit is contained in:
parent
9e54e6e886
commit
139c63bd84
1 changed files with 5 additions and 1 deletions
|
@ -20,7 +20,11 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon {
|
||||||
$ex = $task->getExecutionException();
|
$ex = $task->getExecutionException();
|
||||||
if ($ex) {
|
if ($ex) {
|
||||||
if ($ex instanceof PhabricatorWorkerPermanentFailureException) {
|
if ($ex instanceof PhabricatorWorkerPermanentFailureException) {
|
||||||
$this->log("Task {$id} failed permanently.");
|
$this->log(
|
||||||
|
pht(
|
||||||
|
'Task %s failed permanently: %s',
|
||||||
|
$id,
|
||||||
|
$ex->getMessage()));
|
||||||
} else if ($ex instanceof PhabricatorWorkerYieldException) {
|
} else if ($ex instanceof PhabricatorWorkerYieldException) {
|
||||||
$this->log(pht('Task %s yielded.', $id));
|
$this->log(pht('Task %s yielded.', $id));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue