Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14334263
D13521.id32689.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13521.id32689.diff
View Options
Index: src/applications/drydock/blueprint/DrydockMinMaxBlueprintImplementation.php
===================================================================
--- src/applications/drydock/blueprint/DrydockMinMaxBlueprintImplementation.php
+++ 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')) {
Index: src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php
===================================================================
--- src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php
+++ src/applications/drydock/blueprint/DrydockMinMaxExpiryBlueprintImplementation.php
@@ -41,6 +41,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
@@ -87,8 +93,7 @@
if ($lifetime > $expiry) {
$this->log(pht(
- 'Current lifetime of resource exceeds expiry; triggering close',
- $resource->getID()));
+ 'Current lifetime of resource exceeds expiry; triggering close'));
// Force closure of resources that have expired.
return true;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 5:08 PM (5 h, 9 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6908117
Default Alt Text
D13521.id32689.diff (1 KB)
Attached To
Mode
D13521: [drydock/core] Allow transient leases to be leased even if the resource is at it's maximum lease limit
Attached
Detach File
Event Timeline
Log In to Comment