mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-05 22:45:18 +00:00
change directory into main-dev-dir
This commit is contained in:
parent
1cfb705ad5
commit
76ec264046
19 changed files with 196 additions and 717 deletions
31
plugins/MySQL/MySQL.py
Normal file
31
plugins/MySQL/MySQL.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: cp1252 -*-
|
||||
|
||||
import logging # Global logger
|
||||
import globals # Global variables
|
||||
|
||||
def run(typ,freq,data):
|
||||
try:
|
||||
#ConfigParser
|
||||
logging.debug("reading config file")
|
||||
try:
|
||||
config = dict(globals.config.items("MySQL"))
|
||||
for key,val in config.items():
|
||||
logging.debug(" - %s = %s", key, val)
|
||||
except:
|
||||
logging.exception("cannot read config file")
|
||||
|
||||
if typ == "FMS":
|
||||
#logging.debug("FMS: %s Status: %s Dir: %s", data["fms"], data["status"], data["direction"])
|
||||
logging.debug("FMS")
|
||||
elif typ == "ZVEI":
|
||||
#logging.debug("ZVEI: %s", data["zvei"])
|
||||
logging.debug("ZVEI")
|
||||
elif typ == "POC":
|
||||
#logging.debug("POC: %s/%s - %s", data["ric"], data["function"], data["msg"])
|
||||
logging.debug("POC")
|
||||
else:
|
||||
logging.warning(typ + " not supportet")
|
||||
|
||||
except:
|
||||
logging.exception("unknown error")
|
||||
Loading…
Add table
Add a link
Reference in a new issue