mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
[5.0.x] Fixed #34903, Refs #34825 -- Made workers initialization respect empty set of used connections.
Thanks to David Smith for the investigation & patch. Regression in2128a73713. Follow up toa5905b164d. Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Backport of68d0159b6dfrom main
This commit is contained in:
committed by
Mariusz Felisiak
parent
4dec7eded9
commit
08aa336af4
@@ -431,7 +431,7 @@ def _init_worker(
|
|||||||
django.setup()
|
django.setup()
|
||||||
setup_test_environment(debug=debug_mode)
|
setup_test_environment(debug=debug_mode)
|
||||||
|
|
||||||
db_aliases = used_aliases or connections
|
db_aliases = used_aliases if used_aliases is not None else connections
|
||||||
for alias in db_aliases:
|
for alias in db_aliases:
|
||||||
connection = connections[alias]
|
connection = connections[alias]
|
||||||
if start_method == "spawn":
|
if start_method == "spawn":
|
||||||
|
|||||||
Reference in New Issue
Block a user