deadline doesn’t care When you think something “𝐢𝐬𝐧’𝐭 𝐫𝐞𝐚𝐝𝐲 𝐲𝐞𝐭”… but your 𝐝𝐞𝐚𝐝𝐥𝐢𝐧𝐞 𝐝𝐨𝐞𝐬𝐧’𝐭 𝐜𝐚𝐫𝐞 😅 That was me, staring at 𝑪𝒆𝒍𝒆𝒓𝒚’𝒔 𝒂𝒔𝒚𝒏𝒄 support — shiny in theory, chaotic in practice. I just needed background tasks that actually worked with async FastAPI and asyncpg. Instead, I got: - Tasks randomly freezing like they’d seen a ghost 👻 - Database connections playing musical chairs - And a queue that said, “Nope, not today.” So what do you do when tech says “not yet,” but your project says “yesterday”? You hack it. Carefully. Responsibly. And (mostly) without losing your mind. I spent a few days dissecting Celery’s internals, tweaking connection pools, and turning async + Celery into unlikely friends. The result? Surprisingly stable. Almost… too stable. 😅 The funny part — it wasn’t about clever code.  It was about rethinking architecture. Sometimes “async” doesn’t need to mean “do everything asynchronously.” It just means design smartly for what’s blocking you. > 𝘐𝘵’𝘴 𝘢𝘮𝘢𝘻𝘪𝘯𝘨 𝘩𝘰𝘸 𝘰𝘧𝘵𝘦𝘯 𝘵𝘦𝘤𝘩 𝘧𝘦𝘦𝘭𝘴 “𝘯𝘰𝘵 𝘳𝘦𝘢𝘥𝘺” — 𝘶𝘯𝘵𝘪𝘭 𝘴𝘰𝘮𝘦𝘰𝘯𝘦 𝘴𝘵𝘰𝘱𝘴 𝘸𝘢𝘪𝘵𝘪𝘯𝘨 𝘢𝘯𝘥 𝘮𝘢𝘬𝘦𝘴 𝘪𝘵 𝘸𝘰𝘳𝘬. I recently wrote about this experiment, the mistakes, and the little architectural tricks that made async Celery behave (yes, really - link in comments). If you’ve ever fought with async queues or background jobs — you’ll probably laugh, cry, and maybe find a solution hiding in there. (Hint: It involves asyncpg and a stubborn developer.) #Python #Async #BackendDevelopment #EngineeringStories

To view or add a comment, sign in

Explore content categories