Normalize file retrieving and persistence on binfile, file-gc and helpers

This commit is contained in:
Andrey Antukh 2025-01-23 19:10:53 +01:00
parent 74bdd72d2f
commit 541ed6282f
14 changed files with 222 additions and 278 deletions

View file

@ -119,6 +119,7 @@
(sv/defmethod ::update-file
{::climit/id [[:update-file/by-profile ::rpc/profile-id]
[:update-file/global]]
::webhooks/event? true
::webhooks/batch-timeout (dt/duration "2m")
::webhooks/batch-key (webhooks/key-fn ::rpc/profile-id :id)

View file

@ -57,7 +57,7 @@
;; Process and persist file
(let [file (->> (bfc/process-file file)
(bfc/persist-file! cfg))]
(bfc/save-file! cfg))]
;; The file profile creation is optional, so when no profile is
;; present (when this function is called from profile less
@ -86,7 +86,7 @@
fmeds)]
(db/insert! conn :file-media-object params ::db/return-keys false))
file)))
(bfc/decode-file cfg file))))
(def ^:private
schema:duplicate-file