mirror of
https://github.com/penpot/penpot.git
synced 2025-03-18 10:41:29 -05:00
✨ Add minor improvements to process-files! srepl helper
This commit is contained in:
parent
db5946d1ab
commit
13ca5d1f1a
1 changed files with 8 additions and 4 deletions
|
@ -258,8 +258,10 @@
|
|||
max-jobs
|
||||
start-at
|
||||
on-file
|
||||
validate?
|
||||
rollback?]
|
||||
:or {max-jobs 1
|
||||
validate? true
|
||||
rollback? true}}]
|
||||
|
||||
(l/dbg :hint "process:start"
|
||||
|
@ -282,10 +284,10 @@
|
|||
file (binding [*system* system]
|
||||
(on-file file'))]
|
||||
|
||||
(when (and (some? file)
|
||||
(not (identical? file file')))
|
||||
(when (and (some? file) (not (identical? file file')))
|
||||
|
||||
(cfv/validate-file-schema! file)
|
||||
(when validate?
|
||||
(cfv/validate-file-schema! file))
|
||||
|
||||
(let [file (if (contains? (:features file) "fdata/objects-map")
|
||||
(feat.fdata/enable-objects-map file)
|
||||
|
@ -300,6 +302,9 @@
|
|||
|
||||
(db/update! conn :file
|
||||
{:data (blob/encode (:data file))
|
||||
:deleted-at (:deleted-at file)
|
||||
:created-at (:created-at file)
|
||||
:modified-at (:modified-at file)
|
||||
:features (db/create-array conn "text" (:features file))
|
||||
:revn (:revn file)}
|
||||
{:id file-id}))))))
|
||||
|
@ -314,7 +319,6 @@
|
|||
:file-id (str file-id)
|
||||
:elapsed elapsed)))))]
|
||||
|
||||
|
||||
(try
|
||||
(db/tx-run! main/system
|
||||
(fn [{:keys [::db/conn] :as system}]
|
||||
|
|
Loading…
Add table
Reference in a new issue