Page MenuHomePhabricator

D13521.diff
No OneTemporary

D13521.diff

diff --git a/src/applications/drydock/blueprint/DrydockMinMaxBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockMinMaxBlueprintImplementation.php
--- a/src/applications/drydock/blueprint/DrydockMinMaxBlueprintImplementation.php
+++ b/src/applications/drydock/blueprint/DrydockMinMaxBlueprintImplementation.php
@@ -66,6 +66,12 @@
DrydockResource $resource,
DrydockLease $lease) {
+ // Always permit the allocation of transient leases, as they will not
+ // keep the resource open.
+ if ($lease->getIsTransientLease()) {
+ return true;
+ }
+
// If the current resource can allocate a lease, allow it.
if ($context->getCurrentResourceLeaseCount() <
$this->getDetail('leases-per-resource')) {
diff --git a/src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php
--- a/src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php
+++ b/src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php
@@ -36,6 +36,12 @@
DrydockResource $resource,
DrydockLease $lease) {
+ // Always permit the allocation of transient leases, as they will not
+ // keep the resource open.
+ if ($lease->getIsTransientLease()) {
+ return true;
+ }
+
// If we have no leases allocated to this resource, then we always allow
// the parent logic to evaluate. The reason for this is that an expired
// resource can only be closed when a lease is released, so if the resource

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 2, 9:41 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382698
Default Alt Text
D13521.diff (1 KB)

Event Timeline