planktos icon indicating copy to clipboard operation
planktos copied to clipboard

Cleanup stale snapshots

Open xuset opened this issue 8 years ago • 5 comments
trafficstars

Snapshots should automatically be cleanup when they are stale or the cleanup functionality should be exposed in the api.

xuset avatar Feb 12 '17 16:02 xuset

In the service worker, after update() is called the old snapshots should be removed. This can be accomplished by retrieving the list of snapshots, getAllSnapshots(), and then calling remove() on those snapshots excluding the most recent snapshot.

xuset avatar Apr 25 '17 23:04 xuset

@xuset @alvin319 Shouldn't this be handled in update? I thought we were looking to depreciate the snapshots interface from Planktos?

georgeaf99 avatar Apr 26 '17 14:04 georgeaf99

For it to be handled in update() the interface has to change first which seems out of scope for this issue

xuset avatar Apr 26 '17 14:04 xuset

I'm not sure I see why the interface would have to change? The update function gets the latest snapshot, so it could just delete all the other ones after it finishes storing the new snapshot.

georgeaf99 avatar Apr 26 '17 15:04 georgeaf99

The existing interface doesn't make sense when there can only be one snapshot. getAllSnapshots and removeSnapshot are pointless when there is only one snapshot

xuset avatar Apr 26 '17 18:04 xuset