Split the db connection between multiple Processes. To do this, you must close the db connection at the Process creation, so the process can re-create its own connection.

This commit is contained in:
Samuel Clay 2009-09-16 02:39:45 +00:00
parent 4aa0271047
commit e06b736c5b

View file

@ -225,6 +225,10 @@ class Dispatcher:
def process_feed_wrapper(self):
""" wrapper for ProcessFeed
"""
# Close the DB so the connection can be re-opened on a per-process basis
from django.db import connection
connection.close()
current_process = multiprocessing.current_process()
while True: