Lowered postgres insulation level to autocommit
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Mon, 27 Dec 2010 20:50:24 +0000 (20:50 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Mon, 27 Dec 2010 20:50:24 +0000 (20:50 +0000)
bin/db.py

index 400d616104e619925b4d5f528715cabe269a1bb0..0890ab3f214adbdff23ecb02c9f289630e7f51be 100644 (file)
--- a/bin/db.py
+++ b/bin/db.py
@@ -34,6 +34,7 @@ def get_common_db():
         psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
         __db=psycopg2.connect(get_connect_str())
         __db.set_client_encoding('UTF8')
+        __db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
     return __db
 
 __cursor = None