mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
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:
parent
4aa0271047
commit
e06b736c5b
1 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue