mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 22:36:12 +02:00
🐛 Launch offload only if file-gc has processed the file
This commit is contained in:
parent
280252d40e
commit
ab461ba560
1 changed files with 4 additions and 5 deletions
|
@ -302,15 +302,14 @@
|
||||||
(try
|
(try
|
||||||
(db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}]
|
(db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}]
|
||||||
(let [cfg (update cfg ::sto/storage sto/configure conn)
|
(let [cfg (update cfg ::sto/storage sto/configure conn)
|
||||||
res (process-file! cfg)]
|
processed? (process-file! cfg)]
|
||||||
|
(when (and processed? (contains? cf/flags :tiered-file-data-storage))
|
||||||
(when (contains? cf/flags :tiered-file-data-storage)
|
|
||||||
(wrk/submit! (-> cfg
|
(wrk/submit! (-> cfg
|
||||||
(assoc ::wrk/task :offload-file-data)
|
(assoc ::wrk/task :offload-file-data)
|
||||||
(assoc ::wrk/params props)
|
(assoc ::wrk/params props)
|
||||||
(assoc ::wrk/priority 10)
|
(assoc ::wrk/priority 10)
|
||||||
(assoc ::wrk/delay 1000))))
|
(assoc ::wrk/delay 1000))))
|
||||||
res)))
|
processed?)))
|
||||||
|
|
||||||
(catch Throwable cause
|
(catch Throwable cause
|
||||||
(l/err :hint "error on cleaning file"
|
(l/err :hint "error on cleaning file"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue