mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Cost of connection.close and subsequent reopen documented
This commit is contained in:
@@ -150,6 +150,8 @@ class Foreman:
|
||||
# those constructs stands out. And outside of such decorators you're in autocommit because that's what Django
|
||||
# does.
|
||||
#
|
||||
# Connection close (and subsequent reopen) has a cost that's documented in DESIGN-connections.md.
|
||||
#
|
||||
# Calling connection.close unnecessarily does not incur extra cost, because of `if self.connection is not None`
|
||||
# in django.db.backends.base.base.DatabaseWrapper. (this is also the reason repeated calls to connection.close()
|
||||
# are not a problem). (`connection` below is actually a ConnectionProxy, but it delegates to a DatabaseWrapper).
|
||||
|
||||
Reference in New Issue
Block a user