Skip to content

Commit

Permalink
Fixed #35130 -- Doc'd django.db.close_old_connections().
Browse files Browse the repository at this point in the history
This also adds close_db_connections() to the django.db.__all__.
  • Loading branch information
salvo-polizzi authored Jan 22, 2024
1 parent 1c3a9b9 commit 184d82d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions django/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from django.utils.connection import ConnectionProxy

__all__ = [
"close_old_connections",
"connection",
"connections",
"router",
Expand Down
3 changes: 2 additions & 1 deletion docs/ref/databases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ connections.

If a connection is created in a long-running process, outside of Django’s
request-response cycle, the connection will remain open until explicitly
closed, or timeout occurs.
closed, or timeout occurs. You can use ``django.db.close_old_connections()`` to
close all old or unusable connections.

Encoding
--------
Expand Down

0 comments on commit 184d82d

Please sign in to comment.