How to use the result of a scheduled action?
await ctx.scheduler.runAfter(0, ...)The action returns a value that then is used by the mutation to write to the DB, or that's what I planned
Pseudocode:
But this is not how it works, right? Because the return value of a scheduled action is a promise that resolves to a
Id<"_scheduled_functions">So it looks like I have to schedule the action, and from the action itself run an internal mutation that writes the output of the action to the DB, i.e.:
1. Run public mutation
2. Schedule action
3. Action gets some external data
4. Action runs internal mutation to write to DB
Is that second way the "correct way"?
