#Schedulers with priority

6 messages · Page 1 of 1 (latest)

smoky sinew
#

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.

sand abyss
#

@smoky sinew we should have support for this coming soon!

#

namely, there will be things like convex components that implement a WorkPool that provider higher-level abstractions on top of the "raw" scheduler that can help with traffic control and things like this

finite ruin
sand abyss
#

hmm, I might be misunderstanding. I thought this was a scheduler backup, not our webhook handlers (which are not scheduled)

smoky sinew
#

@finite ruin No particular reason, I never considered it since it's small volume of requests at the moment. I'll add this to my setup