Differential D10580 Diff 25457 src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
<?php | <?php | ||||
final class PhabricatorWorkerActiveTask extends PhabricatorWorkerTask { | final class PhabricatorWorkerActiveTask extends PhabricatorWorkerTask { | ||||
protected $failureTime; | protected $failureTime; | ||||
private $serverTime; | private $serverTime; | ||||
private $localTime; | private $localTime; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | $parent = parent::getConfiguration(); | ||||
$config = array( | |||||
self::CONFIG_IDS => self::IDS_COUNTER, | self::CONFIG_IDS => self::IDS_COUNTER, | ||||
self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'dataID' => array( | 'dataID' => array( | ||||
'columns' => array('dataID'), | 'columns' => array('dataID'), | ||||
'unique' => true, | |||||
), | |||||
'taskClass' => array( | |||||
'columns' => array('taskClass'), | |||||
), | |||||
'leaseExpires' => array( | |||||
'columns' => array('leaseExpires'), | |||||
), | |||||
'leaseOwner' => array( | |||||
'columns' => array('leaseOwner(16)'), | |||||
), | ), | ||||
'key_failuretime' => array( | |||||
'columns' => array('failureTime'), | |||||
), | ), | ||||
) + parent::getConfiguration(); | 'leaseOwner_2' => array( | ||||
'columns' => array('leaseOwner', 'priority', 'id'), | |||||
), | |||||
), | |||||
); | |||||
return $config + $parent; | |||||
} | } | ||||
public function setServerTime($server_time) { | public function setServerTime($server_time) { | ||||
$this->serverTime = $server_time; | $this->serverTime = $server_time; | ||||
$this->localTime = time(); | $this->localTime = time(); | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |