Merge pull request #4731 from penpot/niwinz-bugfix-6

🐛 Fix many race conditions on thumbnail generation process
This commit is contained in:
Aitor Moreno 2024-06-14 13:15:10 +02:00 committed by GitHub
commit 22ede6b08e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 148 additions and 160 deletions

View file

@ -87,10 +87,7 @@
::sm/params [:map {:title "get-file-object-thumbnails"}
[:file-id ::sm/uuid]
[:tag {:optional true} :string]]
::sm/result [:map-of :string :string]
::cond/get-object #(files/get-minimal-file %1 (:file-id %2))
::cond/reuse-key? true
::cond/key-fn files/get-file-etag}
::sm/result [:map-of :string :string]}
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id tag] :as params}]
(dm/with-open [conn (db/open pool)]
(files/check-read-permissions! conn profile-id file-id)