Modify: stop recycle filesystem when generate thumbnails

This commit is contained in:
HFO4 2020-03-11 16:34:19 +08:00
parent 4de0a2577a
commit 439b5a2ce0
2 changed files with 0 additions and 4 deletions

View file

@ -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

View file

@ -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 {