天气晴,穿着裤子被蚊子咬了,广东的蚊子没想到也是996.
业务场景:针对离线上传的数据,当上传多次(次数可设置)之后未成功,则不再上传该条数据。
本次以txt文本为例,存储和读取数据
1、获取当日的数据信息
def readUploadRecord(filePath):
try:
logging.info("开始加载最近一次的上传记录")
currentTime = datetime.datetime.now().strftime('%Y%m%d')
path = currentTime[0:4]+"-"+currentTime[4:6]+"-"+currentTime[6:8]
openPath = filePath+"/"+path+".txt";
with open(openPath