Differential D21806 Diff 51980 src/applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php
Show All 37 Lines | public function canAllocateResourceForLease( | ||||
DrydockBlueprint $blueprint, | DrydockBlueprint $blueprint, | ||||
DrydockLease $lease) { | DrydockLease $lease) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
if ($this->shouldLimitAllocatingPoolSize($blueprint)) { | if ($this->shouldLimitAllocatingPoolSize($blueprint)) { | ||||
return false; | return false; | ||||
} | } | ||||
// TODO: If we have a pending resource which is compatible with the | |||||
// configuration for this lease, prevent a new allocation? Otherwise the | |||||
// queue can fill up with copies of requests from the same lease. But | |||||
// maybe we can deal with this with "pre-leasing"? | |||||
return true; | return true; | ||||
} | } | ||||
public function canAcquireLeaseOnResource( | public function canAcquireLeaseOnResource( | ||||
DrydockBlueprint $blueprint, | DrydockBlueprint $blueprint, | ||||
DrydockResource $resource, | DrydockResource $resource, | ||||
DrydockLease $lease) { | DrydockLease $lease) { | ||||
▲ Show 20 Lines • Show All 515 Lines • Show Last 20 Lines |