mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
ec8460b772
Summary: - Add a method `getSnapshotWindow` to `IInventory` and `DocSnapshotInventory`. It returns a `SnapshotWindow`, which represents a duration of time for which we keep backups for a particular document. - `DocSnapshotPruner` calls this method and passes the window to `shouldKeepSnapshots` to determine which document versions have fallen outside the window and should be pruned. - The implementation passed to `DocSnapshotInventory` uses a new method `getDocProduct` in `HomeDBManager` which directly returns the `Product` associated with a document, given only the document ID. Other methods in `HomeDBManager` require passing more information, especially about a user, but `DocSnapshotPruner` only knows about document IDs. Test Plan: Added a test for `getDocProduct` and a test for `DocSnapshotPruner` where `getSnapshotWindow` is specified. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3322 |
||
---|---|---|
.. | ||
AclRule.ts | ||
Alias.ts | ||
BillingAccount.ts | ||
BillingAccountManager.ts | ||
Document.ts | ||
Group.ts | ||
Login.ts | ||
Organization.ts | ||
Pref.ts | ||
Product.ts | ||
Resource.ts | ||
Secret.ts | ||
User.ts | ||
Workspace.ts |