Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/worker/DrydockWorker.php
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | protected function flushDrydockTaskQueue() { | ||||
return $this; | return $this; | ||||
} | } | ||||
protected function canReclaimResource(DrydockResource $resource) { | protected function canReclaimResource(DrydockResource $resource) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
// Don't reclaim a resource if it has been updated recently. If two | // Don't reclaim a resource if it has been updated recently. If two | ||||
// leases are fighting, we don't want them to keep reclaming resources | // leases are fighting, we don't want them to keep reclaiming resources | ||||
// from one another forever without making progress, so make resources | // from one another forever without making progress, so make resources | ||||
// immune to reclamation for a little while after they activate or update. | // immune to reclamation for a little while after they activate or update. | ||||
// TODO: It would be nice to use a more narrow time here, like "last | // TODO: It would be nice to use a more narrow time here, like "last | ||||
// activation or lease release", but we don't currently store that | // activation or lease release", but we don't currently store that | ||||
// anywhere. | // anywhere. | ||||
$updated = $resource->getDateModified(); | $updated = $resource->getDateModified(); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |