hxger commited on
Commit
a238a90
·
verified ·
1 Parent(s): 9414fef

Update sync_data.sh

Browse files
Files changed (1) hide show
  1. sync_data.sh +2 -2
sync_data.sh CHANGED
@@ -126,8 +126,8 @@ options = {
126
  client = Client(options)
127
  backups = [file for file in client.list() if file.endswith('.tar.gz') and file.startswith('imageflow_backup_')]
128
  backups.sort()
129
- if len(backups) > 5:
130
- to_delete = len(backups) - 5
131
  for file in backups[:to_delete]:
132
  client.clean(file)
133
  print(f'Successfully deleted {file}.')
 
126
  client = Client(options)
127
  backups = [file for file in client.list() if file.endswith('.tar.gz') and file.startswith('imageflow_backup_')]
128
  backups.sort()
129
+ if len(backups) > 1:
130
+ to_delete = len(backups) - 1
131
  for file in backups[:to_delete]:
132
  client.clean(file)
133
  print(f'Successfully deleted {file}.')