mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-23 01:06:43 +00:00
refactor(backups): delete sync_service_snapshots
This commit is contained in:
parent
b9be0be6a2
commit
4ad4c3cc67
|
@ -338,15 +338,6 @@ class Backups:
|
|||
snapshots = Storage.get_cached_snapshots()
|
||||
return [snap for snap in snapshots if snap.service_name == service_id]
|
||||
|
||||
@staticmethod
|
||||
def sync_service_snapshots(service_id: str, snapshots: List[Snapshot]):
|
||||
for snapshot in snapshots:
|
||||
if snapshot.service_name == service_id:
|
||||
Storage.cache_snapshot(snapshot)
|
||||
for snapshot in Backups.get_cached_snapshots_service(service_id):
|
||||
if snapshot.id not in [snap.id for snap in snapshots]:
|
||||
Storage.delete_cached_snapshot(snapshot)
|
||||
|
||||
### Autobackup
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in a new issue