🐛 Process thumbnail creation in serie (less resource usage).

This commit is contained in:
Andrey Antukh 2020-01-27 16:38:43 +01:00
parent 121d300cf7
commit aaa8bfe67d
3 changed files with 8 additions and 7 deletions

View file

@ -32,8 +32,8 @@
(defn populate-thumbnail
[row]
(let [opts +thumbnail-options+]
(-> (px/submit! #(images/populate-thumbnails row opts))
(su/handle-on-context))))
(-> (p/promise row)
(p/then (vc/wrap-blocking #(images/populate-thumbnail % opts))))))
(defn populate-thumbnails
[rows]