Turn on mysql autocommit.

Though I am using the db in read only mode without autocommit all reads
end up reading at the same snapshot as the original.
This commit is contained in:
Tim Kuhlman 2014-05-19 15:14:13 -06:00
parent ea0760508d
commit 9277bab553
2 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ class AlarmProcessor(BaseProcessor):
self.finished_queue = finished_queue
self.mysql = MySQLdb.connect(host=mysql_host, user=mysql_user, passwd=mysql_passwd, db=dbname)
self.mysql.autocommit(True)
@staticmethod
def _parse_alarm(alarm_data):

View File

@ -19,7 +19,7 @@ import setuptools
setuptools.setup(
name="mon-notification",
version="1.0.0",
version="1.0.1",
author="Tim Kuhlman",
author_email="tim.kuhlman@hp.com",
description="Notification engine used in the monitoring system",