Differential D12680 Diff 30510 src/infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | $data = queryfx_all( | ||||
$this->buildLimitClause($conn_w, $limit)); | $this->buildLimitClause($conn_w, $limit)); | ||||
$tasks = $task_table->loadAllFromArray($data); | $tasks = $task_table->loadAllFromArray($data); | ||||
$tasks = mpull($tasks, null, 'getID'); | $tasks = mpull($tasks, null, 'getID'); | ||||
foreach ($data as $row) { | foreach ($data as $row) { | ||||
$tasks[$row['id']]->setServerTime($row['_serverTime']); | $tasks[$row['id']]->setServerTime($row['_serverTime']); | ||||
if ($row['_taskData']) { | if ($row['_taskData']) { | ||||
$task_data = json_decode($row['_taskData'], true); | $task_data = phutil_json_decode($row['_taskData']); | ||||
} else { | } else { | ||||
$task_data = null; | $task_data = null; | ||||
} | } | ||||
$tasks[$row['id']]->setData($task_data); | $tasks[$row['id']]->setData($task_data); | ||||
} | } | ||||
if ($this->skipLease) { | if ($this->skipLease) { | ||||
// Reorder rows into the original phase order if this is a status query. | // Reorder rows into the original phase order if this is a status query. | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |