提交 439b5a2c 编写于 作者: H HFO4

Modify: stop recycle filesystem when generate thumbnails

上级 4de0a257
......@@ -45,8 +45,6 @@ func (fs *FileSystem) GetThumb(ctx context.Context, id uint) (*response.ContentR
// GenerateThumbnail 尝试为本地策略文件生成缩略图并获取图像原始大小
// TODO 失败时,如果之前还有图像信息,则清除
func (fs *FileSystem) GenerateThumbnail(ctx context.Context, file *model.File) {
defer fs.Recycle()
// 判断是否可以生成缩略图
if !IsInExtensionList(HandledExtension, file.Name) {
return
......
......@@ -78,8 +78,6 @@ func (job *TransferTask) GetError() *JobError {
// Do 开始执行任务
func (job *TransferTask) Do() {
defer job.Recycle()
// 创建文件系统
fs, err := filesystem.NewFileSystem(job.User)
if err != nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册