mirror of
https://github.com/eyebluecn/tank.git
synced 2024-04-21 12:32:16 +00:00
Fix the user_uuid error in scanning disk local space.
This commit is contained in:
@@ -132,8 +132,7 @@ func (this *TaskService) doScanTask() {
|
||||
|
||||
this.logger.Info("scan spaceName = %s", space.Name)
|
||||
|
||||
//find admin as operator.
|
||||
// adminUser := this.userDao.FindAnAdmin()
|
||||
//find user by space
|
||||
user := this.userDao.FindByUuid(space.UserUuid)
|
||||
this.matterService.DeleteByPhysics(request, user, space)
|
||||
this.matterService.ScanPhysics(request, user, space)
|
||||
@@ -143,9 +142,6 @@ func (this *TaskService) doScanTask() {
|
||||
})
|
||||
|
||||
} else if scanConfig.Scope == SCAN_SCOPE_CUSTOM {
|
||||
//scan custom user's folder.
|
||||
//find admin as operator.
|
||||
adminUser := this.userDao.FindAnAdmin()
|
||||
|
||||
for _, spaceName := range scanConfig.SpaceNames {
|
||||
space := this.spaceDao.FindByName(spaceName)
|
||||
@@ -155,9 +151,10 @@ func (this *TaskService) doScanTask() {
|
||||
this.logger.Info("scan custom user folder. spaceName = %s", spaceName)
|
||||
|
||||
core.RunWithRecovery(func() {
|
||||
|
||||
this.matterService.DeleteByPhysics(request, adminUser, space)
|
||||
this.matterService.ScanPhysics(request, adminUser, space)
|
||||
//find user by space
|
||||
user := this.userDao.FindByUuid(space.UserUuid)
|
||||
this.matterService.DeleteByPhysics(request, user, space)
|
||||
this.matterService.ScanPhysics(request, user, space)
|
||||
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user