Merge pull request #1068 from GLYASAI/delete-cache

New Feature: delete builder cache
This commit is contained in:
barnettZQG 2021-08-09 09:27:21 +08:00 committed by GitHub
commit 11b07e26e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,7 @@ func NewExportApp(in []byte, m *exectorManager) (TaskWorker, error) {
//Run Run
func (i *ExportApp) Run(timeout time.Duration) error {
defer os.RemoveAll(i.SourceDir)
// disable Md5 checksum
// if ok := i.isLatest(); ok {
// i.updateStatus("success")

View File

@ -118,6 +118,9 @@ func (b *BackupAPPRestore) Run(timeout time.Duration) error {
if err := util.CheckAndCreateDir(cacheDir); err != nil {
return fmt.Errorf("create cache dir error %s", err.Error())
}
// delete the cache data
defer os.RemoveAll(cacheDir)
b.cacheDir = cacheDir
switch backup.BackupMode {
case "full-online":