Merge branch 'feat-hjj-filebrowser#Saas3' into dev
This commit is contained in:
commit
bbf81de56e
@ -2,6 +2,7 @@ package file
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fonchain-fiee/api/files"
|
||||
"fonchain-fiee/pkg/service"
|
||||
@ -292,7 +293,11 @@ func SecurityScan(ctx *gin.Context) {
|
||||
}
|
||||
//后台异步执行扫描
|
||||
go func() {
|
||||
_, err := service.FilesProvider.SecurityScan(ctx, &req)
|
||||
|
||||
// 使用独立的 context,避免原请求 context 被取消
|
||||
scanCtx := context.Background()
|
||||
// 执行安全扫描
|
||||
_, err := service.FilesProvider.SecurityScan(scanCtx, &req)
|
||||
if err != nil {
|
||||
// 记录错误日志
|
||||
zap.L().Error("安全扫描失败",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user