Differential D19797 Diff 47275 src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
| Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | try { | ||||
| $lease = $worker->getRequiredLeaseTime(); | $lease = $worker->getRequiredLeaseTime(); | ||||
| if ($lease !== null) { | if ($lease !== null) { | ||||
| $this->setLeaseDuration($lease); | $this->setLeaseDuration($lease); | ||||
| } | } | ||||
| $t_start = microtime(true); | $t_start = microtime(true); | ||||
| $worker->executeTask(); | $worker->executeTask(); | ||||
| $t_end = microtime(true); | $duration = phutil_microseconds_since($t_start); | ||||
| $duration = (int)(1000000 * ($t_end - $t_start)); | |||||
| $result = $this->archiveTask( | $result = $this->archiveTask( | ||||
| PhabricatorWorkerArchiveTask::RESULT_SUCCESS, | PhabricatorWorkerArchiveTask::RESULT_SUCCESS, | ||||
| $duration); | $duration); | ||||
| $did_succeed = true; | $did_succeed = true; | ||||
| } catch (PhabricatorWorkerPermanentFailureException $ex) { | } catch (PhabricatorWorkerPermanentFailureException $ex) { | ||||
| $result = $this->archiveTask( | $result = $this->archiveTask( | ||||
| PhabricatorWorkerArchiveTask::RESULT_FAILURE, | PhabricatorWorkerArchiveTask::RESULT_FAILURE, | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||