Permalink
Browse files

Close database at task init. Closes #46

  • Loading branch information...
ask committed Jul 19, 2011
1 parent 26604c7 commit 3395d4e4e2ff8a47a88e99a603a21bdd37ef2765
Showing with 4 additions and 0 deletions.
  1. +4 −0 djcelery/loaders.py
View
@@ -67,6 +67,10 @@ def on_process_cleanup(self):
self.close_database()
self.close_cache()
def on_task_init(self, *args, **kwargs):
"""Called before every task."""
self.close_database()
def on_worker_init(self):
"""Called when the worker starts.

0 comments on commit 3395d4e

Please sign in to comment.