python计算

时间:2021-02-07 09:22:18
【文件属性】:

文件名称:python计算

文件大小:1KB

文件格式:PY

更新时间:2021-02-07 09:22:18

python

def writeGroupRtdb(): global devCache tm = utils.today() monTm = utils.toMonth(tm) monTm = utils.stringToTime(monTm) yearTm = utils.toYear(tm) yearTm = utils.stringToTime(yearTm) #print utils.now() for dev in devices: hisq.writeArchive(dev["devName"],monTm,0,"CALC_ProductionMonth",1) hisq.writeArchive(dev["devName"],yearTm,0,"CALC_ProductionYear",1) for group in groups: hisq.writeArchive(group["farmName"],monTm,0,"CALC_ProductionMonth",1) hisq.writeArchive(group["farmName"],yearTm,0,"CALC_ProductionYear",1) if farmCache["farmName"]: hisq.writeArchive(farmCache["farmName"],monTm,0,"CALC_ProductionMonth",1) hisq.writeArchive(farmCache["farmName"],yearTm,0,"CALC_ProductionYear",1) writeGroupRtdb() at.every().day.at("03:00").do(writeGroupRtdb) at.start()


网友评论