Finish the details for the scan task.

This commit is contained in:
lishuang 2020-07-11 21:57:37 +08:00
parent fbea823ba1
commit da0e68f95c
2 changed files with 7 additions and 2 deletions

View File

@ -1166,6 +1166,11 @@ func (this *MatterService) scanPhysicsFolder(request *http.Request, dirInfo os.F
this.logger.Info("update matter: %s size:%d -> %d", name, matter.Size, fileInfo.Size())
this.updateNonDirMatter(matter, fileInfo.Size(), user)
}
} else {
//recursive scan this folder.
this.scanPhysicsFolder(request, fileInfo, matter, user)
}
} else {

View File

@ -91,11 +91,11 @@ func (this *TaskService) doScanTask() {
if err := recover(); err != nil {
this.logger.Info("occur error when do scan task.")
}
this.logger.Info("finish do scan task.")
this.logger.Info("finish the scan task.")
this.scanTaskRunning = false
}()
this.logger.Info("do the scan task.")
this.logger.Info("[cron job] do the scan task.")
preference := this.preferenceService.Fetch()
scanConfig := preference.FetchScanConfig()