mirror of
https://github.com/penpot/penpot.git
synced 2025-07-16 18:05:18 +02:00
✨ Improve the db api efficiency
Mainly setup proper defaults and reduce unnecesary allocations on every db api call.
This commit is contained in:
parent
93bf8c1478
commit
746d898245
28 changed files with 228 additions and 186 deletions
|
@ -149,7 +149,7 @@
|
|||
|
||||
(let [row (th/db-get :team
|
||||
{:id (:default-team-id prof)}
|
||||
{::db/remove-deleted? false})]
|
||||
{::db/remove-deleted false})]
|
||||
(t/is (nil? (:deleted-at row))))
|
||||
|
||||
(let [result (th/run-task! :orphan-teams-gc {:min-age 0})]
|
||||
|
@ -157,7 +157,7 @@
|
|||
|
||||
(let [row (th/db-get :team
|
||||
{:id (:default-team-id prof)}
|
||||
{::db/remove-deleted? false})]
|
||||
{::db/remove-deleted false})]
|
||||
(t/is (dt/instant? (:deleted-at row))))
|
||||
|
||||
;; query profile after delete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue