clear_dbbackup bug
This commit is contained in:
parent
03323fec17
commit
839e11b575
|
@ -29,7 +29,7 @@ def clear_dbbackup(num: int=7):
|
|||
from apps.monitor.views import get_file_list
|
||||
backpath = settings.BACKUP_PATH + '/database'
|
||||
files = get_file_list(backpath)
|
||||
files_remove_list = files[6:]
|
||||
files_remove_list = files[num:]
|
||||
for f in files_remove_list:
|
||||
filepath = os.path.join(backpath, f)
|
||||
os.remove(filepath)
|
||||
|
|
Loading…
Reference in New Issue