X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=pcubad.py;h=181f001ee3d9838368bc8d14a6ae79c95c949de7;hb=4d56ef5473c6486c321dd2797be45b45b0606dae;hp=b31599fd3fe8721ef20471ac08a99220aa662969;hpb=21f8190281cfb38c3e24dfba6c89420830435f1f;p=monitor.git diff --git a/pcubad.py b/pcubad.py index b31599f..181f001 100755 --- a/pcubad.py +++ b/pcubad.py @@ -11,10 +11,11 @@ from pcucontrol import reboot from monitor import parser as parsermodule from monitor import config from monitor.database.info.model import HistoryPCURecord, FindbadPCURecord +from monitor.database.dborm import mon_session as session from monitor.wrapper import plc,plccache from monitor.const import MINUP -from nodecommon import * +from monitor.common import * from nodequery import verify,query_to_dict,node_select from monitor.model import * @@ -93,6 +94,7 @@ def checkAndRecordState(l_pcus, l_plcpcus): # replace with another operations that also commits all pending ops, such # as session.commit() or flush() or something print HistoryPCURecord.query.count() + session.flush() return True