Added rq for queuing, split thumbnails generation into to two functions