Ref T6569. If a lease is activated with an expiration date, schedule a task to try to clean it up after that time.
Details
- Reviewers
hach-que chad - Maniphest Tasks
- T6569: Implement proper expiry mechanism for Drydock resources
- Commits
- Restricted Diffusion Commit
rP337990423740: Allow Drydock leases to expire after a time limit
- Used bin/drydock lease ... --until ... to activate a lease in the near future.
- Waited for a bit.
- Saw it expire and get destroyed at the scheduled time.
Diff Detail
- Repository
- rP Phabricator
- Branch
- drydock4
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 8033 Build 9098: [Placeholder Plan] Wait for 30 Seconds Build 9097: arc lint + arc unit
Event Timeline
src/applications/drydock/management/DrydockManagementLeaseWorkflow.php | ||
---|---|---|
18–20 | align? |
I'm intentionally moving away from aligning stuff in the middle of blocks because it messes with blame and generally tends to produce churn without much benefit.
(In theory, blame would be smarter, and there is git blame -w which is somewhat smarter, but in practice I think it's easier to just not align things.)
src/infrastructure/daemon/workers/PhabricatorWorker.php | ||
---|---|---|
122 | If queue is empty and this is the only task into the queue - it will be immediately executed - is this expected behavior? By default PhabricatorWorkerLeaseQuery fetches unleased tasks which are leaseOwner IS NULL (https://secure.phabricator.com/source/phabricator/browse/master/src/infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php$226), so setting leaseExpire without setting leaseOwner looks like not to yield any delay at all... |