Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
423c0d5e
Kaydet (Commit)
423c0d5e
authored
Mar 07, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added a safety net for developers messing with autocommit.
üst
107d9b1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
__init__.py
django/db/backends/__init__.py
+7
-0
No files found.
django/db/backends/__init__.py
Dosyayı görüntüle @
423c0d5e
...
...
@@ -417,12 +417,19 @@ class BaseDatabaseWrapper(object):
or if it outlived its maximum age.
"""
if
self
.
connection
is
not
None
:
# If the application didn't restore the original autocommit setting,
# don't take chances, drop the connection.
if
self
.
autocommit
!=
self
.
settings_dict
[
'AUTOCOMMIT'
]:
self
.
close
()
return
if
self
.
errors_occurred
:
if
self
.
is_usable
():
self
.
errors_occurred
=
False
else
:
self
.
close
()
return
if
self
.
close_at
is
not
None
and
time
.
time
()
>=
self
.
close_at
:
self
.
close
()
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment