0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

Avoid vthread pinning on invitations

This commit is contained in:
Andrey Antukh 2023-03-18 18:44:57 +01:00
parent 4e7f32aa88
commit e30d1a40bc

View file

@ -764,15 +764,17 @@
:hint "looks like the profile has reported repeatedly as spam or has permanent bounces"))
(let [cfg (assoc cfg ::db/conn conn)
invitations (->> emails
(remove member?)
(map (fn [email]
{:email (str/lower email)
:team team
:profile profile
:role role}))
(keep (partial create-invitation cfg)))]
(with-meta (vec invitations)
invitations (into []
(comp
(remove member?)
(map (fn [email]
{:email (str/lower email)
:team team
:profile profile
:role role}))
(keep (partial create-invitation cfg)))
emails)]
(with-meta invitations
{::audit/props {:invitations (count invitations)}})))))