Re: Using the Django ORM in a long-running worker process

2016-08-19 Thread Mike Dewhirst
We saw a presentation last weekend at pyconau by Andrew Godwin about Django Channels and you might like to check the YouTube video. It lets long-running processes keep web sockets open in parallel with http requests. Connected by Motorola Daniel Tao wrote: >Thank you for the thorough response

Re: Using the Django ORM in a long-running worker process

2016-08-19 Thread Daniel Tao
Thank you for the thorough response, which has proven very helpful, mainly by reinforcing what I was growing to suspect: we've updated the code in our worker processes to close the DB connection after every message, and sure enough we've seen a huge improvement in the form of significantly fewer

Re: Using the Django ORM in a long-running worker process

2016-08-16 Thread James Schneider
> My team has built a service comprising 3 main parts, a web application and 2 long-running worker processes that process events from a message exchange. All of these components interact with the same database and use the same underlying Django "app" for ORM models (i.e. the 2 worker processes call

Re: Using the Django ORM in a long-running worker process

2016-08-16 Thread Daniel Tao
Can I bump this topic back to the top? 1. I actually don't know if this will work (not an experienced Google Groups user here). 2. Even if it does work, I don't know if this is considered bad form or something. If so, apologies. On Monday, August 15, 2016 at 11:28:26 AM UTC-5, Dani

Using the Django ORM in a long-running worker process

2016-08-15 Thread Daniel Tao
Hi folks, My team has built a service comprising 3 main parts, a web application and 2 long-running worker processes that process events from a message exchange. All of these components interact with the same database and use the same underlying Django "app" for ORM models (i.e. the 2 worker p