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:
parent
ea0760508d
commit
9277bab553
@ -38,6 +38,7 @@ class AlarmProcessor(BaseProcessor):
|
|||||||
self.finished_queue = finished_queue
|
self.finished_queue = finished_queue
|
||||||
|
|
||||||
self.mysql = MySQLdb.connect(host=mysql_host, user=mysql_user, passwd=mysql_passwd, db=dbname)
|
self.mysql = MySQLdb.connect(host=mysql_host, user=mysql_user, passwd=mysql_passwd, db=dbname)
|
||||||
|
self.mysql.autocommit(True)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse_alarm(alarm_data):
|
def _parse_alarm(alarm_data):
|
||||||
|
2
setup.py
2
setup.py
@ -19,7 +19,7 @@ import setuptools
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="mon-notification",
|
name="mon-notification",
|
||||||
version="1.0.0",
|
version="1.0.1",
|
||||||
author="Tim Kuhlman",
|
author="Tim Kuhlman",
|
||||||
author_email="tim.kuhlman@hp.com",
|
author_email="tim.kuhlman@hp.com",
|
||||||
description="Notification engine used in the monitoring system",
|
description="Notification engine used in the monitoring system",
|
||||||
|
Loading…
Reference in New Issue
Block a user