Hacking Django Channels for Fun (and Profit)
summary
Shows a concrete hack: subclassing Channels’ runworker to hacked runworker so Django starts long‑running background workers that open persistent websockets to Discord using discord.py. Sends messages from existing Celery schedulers into the channel layer which routes to a consumer that posts to Discord; prototype lands in 24 hours, initially crashes under malformed input then is fixed. Notes a real problem: channel layer capacity default 100 drops messages unless raised (e.g. to 1000).
AI-written summary · about
chapters (20)
- 0:00Intro
- 0:30Welcome
- 1:13Backstory
- 2:29Django Requests
- 3:31ASGI
- 5:03Websocket
- 7:26Channels
- 8:36Consumer Example
- 9:54Routing
- 11:58Discord
- 13:12Reverse Connection
- 13:36Discord Connection
- 14:57Why Django
- 16:15Django Channels Worker
- 18:11Django Channels Worker Code
- 19:22Why do we do this
- 19:42Examples
- 21:51Sending to Discord
- 25:21Wishlist
- 27:02Tips and Tricks
