Differential D10522 Diff 25291 src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
<?php | <?php | ||||
final class PhabricatorWorkerArchiveTask extends PhabricatorWorkerTask { | final class PhabricatorWorkerArchiveTask extends PhabricatorWorkerTask { | ||||
const RESULT_SUCCESS = 0; | const RESULT_SUCCESS = 0; | ||||
const RESULT_FAILURE = 1; | const RESULT_FAILURE = 1; | ||||
const RESULT_CANCELLED = 2; | const RESULT_CANCELLED = 2; | ||||
protected $duration; | protected $duration; | ||||
protected $result; | protected $result; | ||||
public function getConfiguration() { | |||||
$config = parent::getConfiguration(); | |||||
$config[self::CONFIG_COLUMN_SCHEMA] = array( | |||||
'result' => 'uint32', | |||||
'duration' => 'uint64', | |||||
) + $config[self::CONFIG_COLUMN_SCHEMA]; | |||||
return $config; | |||||
} | |||||
public function save() { | public function save() { | ||||
if ($this->getID() === null) { | if ($this->getID() === null) { | ||||
throw new Exception('Trying to archive a task with no ID.'); | throw new Exception('Trying to archive a task with no ID.'); | ||||
} | } | ||||
$other = new PhabricatorWorkerActiveTask(); | $other = new PhabricatorWorkerActiveTask(); | ||||
$conn_w = $this->establishConnection('w'); | $conn_w = $this->establishConnection('w'); | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |