get-convex / convex-helpers

A collection of useful code to complement the official packages.
MIT License
66 stars 9 forks source link

Add Retries helpers and example #68

Closed ianmacartney closed 3 months ago

ianmacartney commented 4 months ago

Adds the retry helpers from https://github.com/JamesCowling/convex-action-retrier Changes the API to instead of exposing a mutation to run, expose a type-safe function that schedules both, whether you're in an action or mutation. The only risk with this is if you call it from an action and the scheduler succeeds on the first but fails the retrier on the second, and the called action fails, which seems exceedingly unlikely.