From: Florent Bruneau Date: Sun, 16 Jan 2011 15:58:52 +0000 (+0100) Subject: Ensure autocommit is always activated. X-Git-Tag: xorg/1.0.2~32^2 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=31ddf875617ffddbc713b7acfc5ab3c4711c5c09;p=platal.git Ensure autocommit is always activated. This should have two major consequences: * the rpc should have a view of the db consistent with the view of the website * this should reduce the overall memory footprint of the mysql database since there is no "in progress transaction" and thus no need to keep old data in the db. Signed-off-by: Florent Bruneau --- diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 557b4c1..5f7e921 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -167,6 +167,7 @@ def connectDB(): passwd=MYSQL_PASS, unix_socket='/var/run/mysqld/mysqld.sock') db.ping() + db.autocommit(True) return db.cursor() def mysql_fetchone(query):