Tech
Design Publishing Queues That Survive Image Provider Outages
A publishing queue should not forget an article because a photo API had a bad afternoon.
Quick solution:
if ( providerError . isTransient ) {
return queue . defer ({ state : " MEDIA_PENDING " , retryAfter : " 1h " });
}
The retry design must respect Cloudflare Workflow limits and the provider's Pexels API documentation ; provider failure does not decide whether the article itself is valid.
Yet that is exactly what happens when a ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to