runafter vs wrapper-action
At the moment I have two different cases in which I'm adopting two different strategies:
- I'm sending emails after storing an invitation record in convex using
scheduler.runAfer(0, internal.emails.sendemail) from whitin the mutation that stores the invitation record- I'm sending push notification after storing a message in convex. I have a convex action that wraps (1) the mutation that stores the message; (2) the query to retrieve the push subscriptions; (3) the action to send the notifications.
What would be the suggested approach for this kind of scenarios?
