Menu

Four step clocks in our job runner, and the one over a model call was shorter than the model client's own retry
📰

Four step clocks in our job runner, and the one over a model call was shorter than the model client's own retry

DEV Community: node·Daniel Pertu·3 days ago
#HZavEtgl
#devtonodejs#devto#dev#call#runner
Reading 0:00
15s threshold

Munchable has a lot of pages that nobody wrote. The answers index and the few hundred pages under it, like is soy sauce gluten free , are generated at build time from data the product holds. Which means the interesting question is not how the pages render. It is what fills the data, and that is background work: long passes over catalogue vocabulary, batched out to a model, written back.

This post is about the runner underneath that work, and specifically about a timeout constant that was set to a sensible-looking number and silently broke every long run we tried.

What is left of our background infrastructure

Here is the whole of apps/web/vercel.json :

{ "$schema" : "https://openapi.vercel.sh/vercel.json" , "crons" : [ { "path" : "/api/cron/rewards-settle" , "schedule" : "0 4 8 * *" }, { "path" : "/api/cron/indexnow" , "schedule" : "0 * * * *" } ] }

Enter fullscreen mode

Exit fullscreen mode

Two scheduled jobs. One settles contributor rewards, monthly.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.