Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15460654
D18106.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18106.diff
View Options
diff --git a/src/applications/metamta/PhabricatorMetaMTAWorker.php b/src/applications/metamta/PhabricatorMetaMTAWorker.php
--- a/src/applications/metamta/PhabricatorMetaMTAWorker.php
+++ b/src/applications/metamta/PhabricatorMetaMTAWorker.php
@@ -13,10 +13,6 @@
protected function doWork() {
$message = $this->loadMessage();
- if (!$message) {
- throw new PhabricatorWorkerPermanentFailureException(
- pht('Unable to load message!'));
- }
if ($message->getStatus() != PhabricatorMailOutboundStatus::STATUS_QUEUE) {
return;
@@ -32,7 +28,18 @@
private function loadMessage() {
$message_id = $this->getTaskData();
- return id(new PhabricatorMetaMTAMail())->load($message_id);
+ $message = id(new PhabricatorMetaMTAMail())
+ ->load($message_id);
+
+ if (!$message) {
+ throw new PhabricatorWorkerPermanentFailureException(
+ pht(
+ 'Unable to load mail message (with ID "%s") while preparing to '.
+ 'deliver it.',
+ $message_id));
+ }
+
+ return $message;
}
public function renderForDisplay(PhabricatorUser $viewer) {
diff --git a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php
--- a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php
+++ b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php
@@ -23,11 +23,15 @@
$ex = $task->getExecutionException();
if ($ex) {
if ($ex instanceof PhabricatorWorkerPermanentFailureException) {
- $this->log(
+ // NOTE: Make sure these reach the daemon log, even when not
+ // running in "phd.verbose" mode. See T12803 for discussion.
+ $log_exception = new PhutilProxyException(
pht(
- 'Task %d was cancelled: %s',
- $id,
- $ex->getMessage()));
+ 'Task "%s" encountered a permanent failure and was '.
+ 'cancelled.',
+ $id),
+ $ex);
+ phlog($log_exception);
} else if ($ex instanceof PhabricatorWorkerYieldException) {
$this->log(pht('Task %s yielded.', $id));
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 2, 12:53 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7529961
Default Alt Text
D18106.diff (2 KB)
Attached To
Mode
D18106: Send permanent dameon failures to the log, even when not running in verbose mode
Attached
Detach File
Event Timeline
Log In to Comment