Skip to content

Commit bc541fe

Browse files
committed
Fix multiprocessing regression in update_index
4e1e2e1 introduced a bug because it used a property name which exists on haystack.ConnectionHandler but not the Django ConnectionHandler class it's modeled on. Long-term, we should rename the Haystack class to something like `SearchConnectionHandler` to avoid future confusion. Closes django-haystack#1449
1 parent ea0b52a commit bc541fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

haystack/management/commands/update_index.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def update_worker(args):
4242
if 'sqlite3' not in info['ENGINE']:
4343
try:
4444
close_old_connections()
45-
if isinstance(connections.thread_local.connections, dict):
46-
del connections.thread_local.connections[alias]
45+
if isinstance(connections._connections, dict):
46+
del connections._connections[alias]
4747
else:
48-
delattr(connections.thread_local.connections, alias)
48+
delattr(connections._connections, alias)
4949
except KeyError:
5050
pass
5151

0 commit comments

Comments
 (0)