chg: refactoring
This commit is contained in:
+1
-3
@@ -439,9 +439,7 @@ class Dataset:
|
|||||||
self._clean_old_snapshots_for_interval(interval, number)
|
self._clean_old_snapshots_for_interval(interval, number)
|
||||||
|
|
||||||
def _clean_old_snapshots_for_interval(self, interval: str, max_count: int):
|
def _clean_old_snapshots_for_interval(self, interval: str, max_count: int):
|
||||||
regex = _get_regex_matching_snapshots_with_tags(
|
regex = _get_regex_matching_snapshots_with_tags([config.snapshot_tag, interval])
|
||||||
[config.snapshot_tag, interval]
|
|
||||||
)
|
|
||||||
snapshots = [
|
snapshots = [
|
||||||
snapshot for snapshot in self.snapshots if snapshot.matches_regex(regex)
|
snapshot for snapshot in self.snapshots if snapshot.matches_regex(regex)
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user