Feat: improve thumbnails proformance and GC for local policy (#1044)
* thumb generating improvement Replace "github.com/nfnt/resize" with "golang.org/x/image/draw". Add thumb task queue to avoid oom when batch thumb operation * thumb improvement * Add some tests for thumbnail generation
This commit is contained in:
@@ -38,3 +38,12 @@ func TestFileSystem_GetThumb(t *testing.T) {
|
||||
asserts.EqualValues(50, res.MaxAge)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFileSystem_ThumbWorker(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
|
||||
asserts.NotPanics(func() {
|
||||
getThumbWorker().addWorker()
|
||||
getThumbWorker().releaseWorker()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user