MordsithM
Convex Community2y ago
6 replies
Mordsith

Schedulers with priority

It would be nice if the schedulers can have a priority to control how functions are executed.

In my scenario, I'm consumin a Webhook from Microsoft Azure that calls my convex route which triggers a scheduled function (rate Limited / 1minute).

There were 10 failed webhooks, the 3rd party provider keeps retrying the failed webhook when a new request comes in.

For example, a new user makes a request, expected to receive a result in 1minute (rateLimit), however, the provider automatically retries the previous webhooks that failed in random order. Each of this run waits for 1minute thereby making the new user wait 10 minute before his request is processed.

If there was a way to prioritize the scheduler + rateLimit, HIGH, LOW, MEDIUM or something close so that even when we have 100 items scheduled to run, it starts with functions with HIGH priorities first, assuming the failed request was set with LOW priority.

With this in place, failed webhooks won't stall results for new users as they'll be processed later.
Was this page helpful?