Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
<?php | <?php | ||||
abstract class PhabricatorWorkerTask extends PhabricatorWorkerDAO { | abstract class PhabricatorWorkerTask extends PhabricatorWorkerDAO { | ||||
// NOTE: If you provide additional fields here, make sure they are handled | // NOTE: If you provide additional fields here, make sure they are handled | ||||
// correctly in the archiving process. | // correctly in the archiving process. | ||||
protected $taskClass; | protected $taskClass; | ||||
protected $leaseOwner; | protected $leaseOwner; | ||||
protected $leaseExpires; | protected $leaseExpires; | ||||
protected $failureCount; | protected $failureCount; | ||||
protected $dataID; | protected $dataID; | ||||
protected $priority; | protected $priority; | ||||
protected $objectPHID; | protected $objectPHID; | ||||
protected $containerPHID; | |||||
private $data; | private $data; | ||||
private $executionException; | private $executionException; | ||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'taskClass' => 'text64', | 'taskClass' => 'text64', | ||||
'leaseOwner' => 'text64?', | 'leaseOwner' => 'text64?', | ||||
'leaseExpires' => 'epoch?', | 'leaseExpires' => 'epoch?', | ||||
'failureCount' => 'uint32', | 'failureCount' => 'uint32', | ||||
'failureTime' => 'epoch?', | 'failureTime' => 'epoch?', | ||||
'priority' => 'uint32', | 'priority' => 'uint32', | ||||
'objectPHID' => 'phid?', | 'objectPHID' => 'phid?', | ||||
'containerPHID' => 'phid?', | |||||
), | ), | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'key_object' => array( | 'key_object' => array( | ||||
'columns' => array('objectPHID'), | 'columns' => array('objectPHID'), | ||||
), | ), | ||||
'key_container' => array( | |||||
'columns' => array('containerPHID'), | |||||
), | |||||
), | ), | ||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
final public function setExecutionException($execution_exception) { | final public function setExecutionException($execution_exception) { | ||||
$this->executionException = $execution_exception; | $this->executionException = $execution_exception; | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |