title: Threaded Django task doesn't automatically handle transactions or db connections?
body: <p>I've got Django set up to run some recurring tasks in their own threads, and I noticed that they were always leaving behind unfinished database connection processes (pgsql "Idle In Transaction").</p>
  
  <p>I looked through the Postgres logs and found that the transactions weren't being completed (no ROLLBACK). I tried using the various transaction decorators on my functions, no luck.</p>
  
  <p>I switched to manual transaction management and did the rollback manually, that worked, but still left the processes as "Idle".</p>
  
  <p>So then I called connection.close(), and all is well.</p>
  
  <p>But I'm left wondering, why doesn't Django's typical transaction and connection management work for these threaded tasks that are being spawned from the main Django thread?</p>