Differential D11044 Diff 26524 src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
| Show All 27 Lines | $config = array( | ||||
| 'columns' => array('leaseOwner(16)'), | 'columns' => array('leaseOwner(16)'), | ||||
| ), | ), | ||||
| 'key_failuretime' => array( | 'key_failuretime' => array( | ||||
| 'columns' => array('failureTime'), | 'columns' => array('failureTime'), | ||||
| ), | ), | ||||
| 'leaseOwner_2' => array( | 'leaseOwner_2' => array( | ||||
| 'columns' => array('leaseOwner', 'priority', 'id'), | 'columns' => array('leaseOwner', 'priority', 'id'), | ||||
| ), | ), | ||||
| ), | ) + $parent[self::CONFIG_KEY_SCHEMA], | ||||
| ); | ); | ||||
| $config[self::CONFIG_COLUMN_SCHEMA] = array( | $config[self::CONFIG_COLUMN_SCHEMA] = array( | ||||
| // T6203/NULLABILITY | // T6203/NULLABILITY | ||||
| // This isn't nullable in the archive table, so at a minimum these | // This isn't nullable in the archive table, so at a minimum these | ||||
| // should be the same. | // should be the same. | ||||
| 'dataID' => 'uint32?', | 'dataID' => 'uint32?', | ||||
| ) + $parent[self::CONFIG_COLUMN_SCHEMA]; | ) + $parent[self::CONFIG_COLUMN_SCHEMA]; | ||||
| ▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | try { | ||||
| $result = $this; | $result = $this; | ||||
| } | } | ||||
| // NOTE: If this throws, we don't want it to cause the task to fail again, | // NOTE: If this throws, we don't want it to cause the task to fail again, | ||||
| // so execute it out here and just let the exception escape. | // so execute it out here and just let the exception escape. | ||||
| if ($did_succeed) { | if ($did_succeed) { | ||||
| foreach ($worker->getQueuedTasks() as $task) { | foreach ($worker->getQueuedTasks() as $task) { | ||||
| list($class, $data) = $task; | list($class, $data) = $task; | ||||
| PhabricatorWorker::scheduleTask($class, $data, $this->getPriority()); | PhabricatorWorker::scheduleTask( | ||||
| $class, | |||||
| $data, | |||||
| array( | |||||
| 'priority' => $this->getPriority(), | |||||
| )); | |||||
| } | } | ||||
| } | } | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| } | } | ||||