diff --git a/CHANGELOG.md b/CHANGELOG.md index fcc954875..699fc5001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changes - Log more when saving annotations ([#1525](../../pull/1525)) +- Thumbnail generation jobs are less blocking ([#1528](../../pull/1528)) ## 1.28.2 diff --git a/girder/girder_large_image/rest/large_image_resource.py b/girder/girder_large_image/rest/large_image_resource.py index 9a5a088b9..447733cf9 100644 --- a/girder/girder_large_image/rest/large_image_resource.py +++ b/girder/girder_large_image/rest/large_image_resource.py @@ -22,6 +22,7 @@ import pprint import re import shutil +import threading import time import cherrypy @@ -117,6 +118,11 @@ def cursorNextOrNone(cursor): def createThumbnailsJob(job): + thread = threading.Thread(target=createThumbnailsJobThread, args=(job, ), daemon=True) + thread.start() + + +def createThumbnailsJobThread(job): """ Create thumbnails for all of the large image items.