sorl-thumbnail icon indicating copy to clipboard operation
sorl-thumbnail copied to clipboard

Delayed generation ?

Open kedare opened this issue 8 years ago • 1 comments

Hello.

Would it be interesting to implement a delayed generation ?

For example using Celery, the first call of the get_thumbnail function could fallback to the original file and request a background task to generate the images, and then when the thumbnails are available, it would return them instead.

Is there any plan of feature like that ? Would it be interesting ?

Thanks

kedare avatar Jan 14 '17 20:01 kedare

We based our Celery tasks (a while ago) off of https://github.com/aidanlister/sorlery and have built a few custom methods for handling the fallback when a thumbnail doesn't exist. There did not appear to be a whole lot that needed to be changed in order to move generating thumbnails to our worker server.

There's a really good chance that if you search for how to generate sorl thumbnails with Celery, you'll find a more up-to-date resource for how to accomplish it.

kevin-brown avatar Jan 14 '17 22:01 kevin-brown