Tech
Node.js Renewal Deadlines: Scheduled Cleanup via HTTP Cron for Old Records
Short answer: use nightly cron only to call a small Node.js HTTP endpoint; let that endpoint enqueue a cleanup sweep, then let idempotent queue workers delete old renewal records in bounded batches. Keep a short cleanup inline only when its worst-case duration fits comfortably inside the request deadline.
For an edtech renewal system, โoldโ is a business rule, not created_at < now() . A reminder may have been created weeks ago and still need to wait for a district's renewal deadline. The ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to