mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 04:19:08 -05:00
🔥 Remove unnecesary call to px/wrap-bindings
This commit is contained in:
parent
1d9481ceb7
commit
2e4a5aee61
2 changed files with 5 additions and 9 deletions
|
@ -47,7 +47,8 @@
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
[datoteka.io :as io]
|
[datoteka.io :as io]
|
||||||
[promesa.exec :as px]
|
[promesa.exec :as px]
|
||||||
[promesa.exec.semaphore :as ps]))
|
[promesa.exec.semaphore :as ps]
|
||||||
|
[promesa.util :as pu]))
|
||||||
|
|
||||||
(def ^:dynamic *system* nil)
|
(def ^:dynamic *system* nil)
|
||||||
(def ^:dynamic *stats* nil)
|
(def ^:dynamic *stats* nil)
|
||||||
|
@ -698,10 +699,7 @@
|
||||||
(l/trc :hint "graphic processed"
|
(l/trc :hint "graphic processed"
|
||||||
:file-id (str (:id fdata))
|
:file-id (str (:id fdata))
|
||||||
:media-id (str (:id mobj))
|
:media-id (str (:id mobj))
|
||||||
:elapsed (dt/format-duration (tp1)))))))
|
:elapsed (dt/format-duration (tp1)))))))]
|
||||||
|
|
||||||
process (px/wrap-bindings process)]
|
|
||||||
|
|
||||||
(try
|
(try
|
||||||
(->> (d/zip media-group grid)
|
(->> (d/zip media-group grid)
|
||||||
(map (fn [[mobj position]]
|
(map (fn [[mobj position]]
|
||||||
|
@ -717,7 +715,7 @@
|
||||||
fdata))
|
fdata))
|
||||||
fdata))
|
fdata))
|
||||||
(finally
|
(finally
|
||||||
(.close ^java.lang.AutoCloseable executor)))))
|
(pu/close! executor)))))
|
||||||
|
|
||||||
(defn- migrate-graphics
|
(defn- migrate-graphics
|
||||||
[fdata]
|
[fdata]
|
||||||
|
|
|
@ -177,9 +177,7 @@
|
||||||
(f)))
|
(f)))
|
||||||
|
|
||||||
([{:keys [::id ::cache ::mtx/metrics]} f executor]
|
([{:keys [::id ::cache ::mtx/metrics]} f executor]
|
||||||
(let [f (fn []
|
(let [f #(p/await! (px/submit! executor f))]
|
||||||
(let [f (px/wrap-bindings f)]
|
|
||||||
(p/await! (px/submit! executor f))))]
|
|
||||||
(if (and cache id)
|
(if (and cache id)
|
||||||
(invoke! cache metrics id nil f)
|
(invoke! cache metrics id nil f)
|
||||||
(f)))))
|
(f)))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue