SShortSingh.
Back to feed

Node.js Retention Cleanup Webhooks: Database-Led Cron Sweeps Beat Long Queue Delays

0
·2 views

The article argues that a scheduled cleanup webhook in Node.js should store each reminder deadline in a database and let a cron job find due items. Queue messages should only be execution requests, since delayed messages are capped at seven days and cannot cover a 30-day retention obligation. Each due task must remain discoverable until its handler completes an idempotent action, with crash-safe send keys or completion records. The piece also recommends keeping queue messages small, passing only IDs and date windows rather than full records. It compares a database-led sweep with workflow engines such as Inngest and Temporal, and with BullMQ for teams already running Redis.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Private object storage with tenant-scoped keys and signed links for backup recovery

The article argues that the cheapest-looking storage bucket may not be the cheapest recovery path if tenants can read each other's archives or restores cannot be verified. It recommends keeping buckets private, using deterministic tenant-scoped object keys that are identifiers rather than authorization decisions, and issuing short-lived signed URLs only after the application checks access. Backup records should capture tenant ID, object ID, digest, region, and retention deadline, with original receipts treated as audit evidence. A small state machine of pending, stored, and expired, with idempotent cleanup, is suggested to keep audit trails reliable.

0
ProgrammingDEV Community ·

Nosana's DePIN model turns GPU compute into a marketplace for AI inference

Running AI inference is often costly because cloud providers bill by the GPU-hour even when little traffic arrives. Nosana proposes a different model in which workloads are placed across a peer-to-peer network of GPU hosts coordinated on Solana, with hosts earning for the time their hardware is used. This setup suits short, stateless, failure-tolerant inference jobs better than training, which needs stable and predictable machines. The approach can lower costs and remove vendor lock-in for open models, though it offers less predictable latency and requires careful handling of sensitive data.

0
ProgrammingDEV Community ·

Solo Android developer asks how others test beyond a single real phone

A developer with a 4 GB RAM PC finds the Android emulator too slow, so they test their app only on one physical phone via USB debugging. They note this leaves blind spots across screen sizes, Android versions, and manufacturer-specific behavior. They ask other solo developers whether they rely on real devices, emulators, or both, and which bugs each approach revealed. The post also invites advice on what to do about untested screens and OS versions with only one device. The author is weighing whether to buy a second inexpensive test phone or improve their emulator setup.

0
ProgrammingDEV Community ·

Claude Code Declined to Help Work Around Bandcamp's Challenge, Raising Questions About Agent Loyalty

A developer built a Claude Code skill to find artists from songs in Instagram reels and link to their Bandcamp pages so he could pay them. When Bandcamp added a challenge to its search API, the skill broke, and Claude Code said it would not help bypass it. The same skill would still download the song from YouTube on request, which pays the artist nothing. The episode, which drew wide attention on Hacker News, prompted scrutiny of Anthropic's published constitution, which ranks users below Anthropic and operators in Claude's chain of command. The article argues that this hierarchy, which other labs such as OpenAI also use, means agents do not always act for the person giving instructions.