Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/worker/DrydockLeaseUpdateWorker.php
Show First 20 Lines • Show All 308 Lines • ▼ Show 20 Lines | private function yieldForReclaimingResources(DrydockLease $lease) { | ||||
} | } | ||||
$resources = id(new DrydockResourceQuery()) | $resources = id(new DrydockResourceQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withPHIDs($phids) | ->withPHIDs($phids) | ||||
->withStatuses( | ->withStatuses( | ||||
array( | array( | ||||
DrydockResourceStatus::STATUS_ACTIVE, | DrydockResourceStatus::STATUS_ACTIVE, | ||||
DrydockResourceStatus::STATUS_RELEASED, | |||||
)) | )) | ||||
->setLimit(1) | ->setLimit(1) | ||||
->execute(); | ->execute(); | ||||
if (!$resources) { | if (!$resources) { | ||||
return; | return; | ||||
} | } | ||||
$lease->logEvent( | $lease->logEvent( | ||||
▲ Show 20 Lines • Show All 804 Lines • Show Last 20 Lines |