Page MenuHomePhabricator

D21271.diff
No OneTemporary

D21271.diff

diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
--- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
+++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
@@ -134,6 +134,7 @@
$did_succeed = false;
$worker = null;
+ $caught = null;
try {
$worker = $this->getWorkerInstance();
$worker->setCurrentWorkerTask($this);
@@ -180,6 +181,12 @@
$result = $this;
} catch (Exception $ex) {
+ $caught = $ex;
+ } catch (Throwable $ex) {
+ $caught = $ex;
+ }
+
+ if ($caught) {
$this->setExecutionException($ex);
$this->setFailureCount($this->getFailureCount() + 1);
$this->setFailureTime(time());
diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
--- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
+++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
@@ -34,7 +34,7 @@
) + parent::getConfiguration();
}
- final public function setExecutionException(Exception $execution_exception) {
+ final public function setExecutionException($execution_exception) {
$this->executionException = $execution_exception;
return $this;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 23, 6:27 PM (8 h, 35 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7187403
Default Alt Text
D21271.diff (1 KB)

Event Timeline