Permalink
Browse files
Close database at task init. Closes #46
- Loading branch information...
Showing
with
4 additions
and
0 deletions.
-
+4
−0
djcelery/loaders.py
|
|
@@ -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