mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 17:46:38 +02:00
✨ Improve file-gc task
make it more aware of fragments referenced on changes snapshots
This commit is contained in:
parent
82dad3217b
commit
5e89aa2726
7 changed files with 260 additions and 130 deletions
|
@ -44,7 +44,8 @@
|
|||
"storage/pointer-map"
|
||||
"components/v2"})
|
||||
|
||||
(def default-features
|
||||
(defn get-default-features
|
||||
[]
|
||||
(cond-> #{}
|
||||
(contains? cf/flags :fdata-storage-pointer-map)
|
||||
(conj "storage/pointer-map")
|
||||
|
@ -234,6 +235,15 @@
|
|||
(update-fn val)
|
||||
val)))))))
|
||||
|
||||
|
||||
(defn get-all-pointer-ids
|
||||
"Given a file, return all pointer ids used in the data."
|
||||
[fdata]
|
||||
(->> (concat (vals fdata)
|
||||
(vals (:pages-index fdata)))
|
||||
(into #{} (comp (filter pmap/pointer-map?)
|
||||
(map pmap/get-id)))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; QUERY COMMANDS
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue