Posts tagged #django
-
From Bug Fix to Production Hardening: A Refactoring Marathon
Stalled task detection, security hardening, code refactoring, and lifecycle signals — turning a task queue into production-grade infrastructure.
-
Pessimistic Locking: One Task, One Worker
Using SELECT FOR UPDATE SKIP LOCKED to prevent multiple workers from claiming the same task — database-level concurrency without application-level locks.
-
The Fork Bug and the Deploy Bug
Two production bugs found in one debugging session: a database connection shared across fork(), and a deploy script that deleted the directory out from under a running worker.
-
Hunting Memory Leaks in a Django Task Worker
Production memory climbing to 500 MB. The fix: run tasks in subprocesses so the OS reclaims everything. From 500 MB to 50 MB.
-
django-simple-queue: 300 Lines to Replace Celery
How a ~300 LOC task queue built on Django ORM replaces Celery for small teams — the architecture, the tradeoffs, and when it makes sense.