diff --git a/config_jingbo.py b/config_jingbo.py index bacd157..28fde4c 100644 --- a/config_jingbo.py +++ b/config_jingbo.py @@ -91,48 +91,48 @@ ClassifyId = 1214 ################################################################################################################ 变量定义--线上环境 -login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login" -upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave" -upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save" +# login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login" +# upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave" +# upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save" -login_data = { - "data": { - "account": "api_dev", - "password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", - "tenantHashCode": "8a4577dbd919675758d57999a1e891fe", - "terminal": "API" - }, - "funcModule": "API", - "funcOperation": "获取token" -} +# login_data = { +# "data": { +# "account": "api_dev", +# "password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", +# "tenantHashCode": "8a4577dbd919675758d57999a1e891fe", +# "terminal": "API" +# }, +# "funcModule": "API", +# "funcOperation": "获取token" +# } -upload_data = { - "funcModule":'研究报告信息', - "funcOperation":'上传原油价格预测报告', - "data":{ - "ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋 - "reportType":'OIL_PRICE_FORECAST', # 报告类型,固定为OIL_PRICE_FORECAST - "fileName": '', #文件名称 - "fileBase64": '' ,#文件内容base64 - "categoryNo":'yyjgycbg', # 研究报告分类编码 - "smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码 - "reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋 - "reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部 - "productGroupCode":"RAW_MATERIAL" # 商品分类 - } -} +# upload_data = { +# "funcModule":'研究报告信息', +# "funcOperation":'上传原油价格预测报告', +# "data":{ +# "ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋 +# "reportType":'OIL_PRICE_FORECAST', # 报告类型,固定为OIL_PRICE_FORECAST +# "fileName": '', #文件名称 +# "fileBase64": '' ,#文件内容base64 +# "categoryNo":'yyjgycbg', # 研究报告分类编码 +# "smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码 +# "reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋 +# "reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部 +# "productGroupCode":"RAW_MATERIAL" # 商品分类 +# } +# } -warning_data = { - "funcModule":'原油特征停更预警', - "funcOperation":'原油特征停更预警', - "data":{ - 'WARNING_TYPE_NAME':'特征数据停更预警', - 'WARNING_CONTENT':'', - 'WARNING_DATE':'' - } -} +# warning_data = { +# "funcModule":'原油特征停更预警', +# "funcOperation":'原油特征停更预警', +# "data":{ +# 'WARNING_TYPE_NAME':'特征数据停更预警', +# 'WARNING_CONTENT':'', +# 'WARNING_DATE':'' +# } +# } # 生产环境数据库 # url: jdbc:mysql://rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com:3306/jingbo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&useSSL=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true diff --git a/main_yuanyou.py b/main_yuanyou.py index d957d81..38e5722 100644 --- a/main_yuanyou.py +++ b/main_yuanyou.py @@ -139,8 +139,8 @@ def predict_main(): sqlitedb.insert_data('most_model', (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'), most_common_model,), columns=('ds', 'most_common_model',)) try: - # if is_weekday: - if True: + if is_weekday: + # if True: logger.info('今天是周一,发送特征预警') # 上传预警信息到数据库 warning_data_df = df_zhibiaoliebiao.copy() @@ -234,7 +234,7 @@ def predict_main(): file=max(glob.glob(os.path.join(dataset,'*.pdf')), key=os.path.getctime), ssl=ssl, ) - # m.send_mail() + m.send_mail() if __name__ == '__main__':