diff --git a/lib/dataread.py b/lib/dataread.py index 7d134d6..1291650 100644 --- a/lib/dataread.py +++ b/lib/dataread.py @@ -1155,6 +1155,8 @@ class Config: # 接口配置 @property def upload_url(self): return global_config['upload_url'] + @property + def upload_data(self): return global_config['upload_data'] @property def login_pushreport_url( diff --git a/main_juxiting.py b/main_juxiting.py index ada868d..f766fed 100644 --- a/main_juxiting.py +++ b/main_juxiting.py @@ -388,7 +388,7 @@ def predict_main(): if __name__ == '__main__': # global end_time # 遍历2024-11-25 到 2024-12-3 之间的工作日日期 - for i_time in pd.date_range('2025-2-10', '2025-3-18', freq='B'): + for i_time in pd.date_range('2025-3-19', '2025-3-29', freq='B'): try: global_config['end_time'] = i_time.strftime('%Y-%m-%d') predict_main() diff --git a/main_yuanyou_zhoudu.py b/main_yuanyou_zhoudu.py index 6d38deb..8a1e6db 100644 --- a/main_yuanyou_zhoudu.py +++ b/main_yuanyou_zhoudu.py @@ -49,6 +49,7 @@ global_config.update({ 'login_pushreport_url': login_pushreport_url, 'login_data': login_data, 'upload_url': upload_url, + 'upload_data': upload_data, 'upload_warning_url': upload_warning_url, 'warning_data': warning_data, @@ -437,9 +438,13 @@ def predict_main(): if __name__ == '__main__': # global end_time - # # 遍历2024-11-25 到 2024-12-3 之间的工作日日期 - # for i_time in pd.date_range('2024-12-1', '2025-2-26', freq='W'): - # end_time = i_time.strftime('%Y-%m-%d') - # predict_main() + # 遍历2024-11-25 到 2024-12-3 之间的工作日日期 + # for i_time in pd.date_range('2025-1-1', '2025-3-29', freq='B'): + # try: + # global_config['end_time'] = i_time.strftime('%Y-%m-%d') + # predict_main() + # except Exception as e: + # logger.info(f'预测失败:{e}') + # continue predict_main() diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index 414a89c..df12d19 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -2499,10 +2499,10 @@ def brent_export_pdf(num_indicators=475, num_models=21, num_dayindicator=202, in if config.is_update_report: with open(os.path.join(config.dataset, reportname), 'rb') as f: base64_data = base64.b64encode(f.read()).decode('utf-8') - upload_data["data"]["fileBase64"] = base64_data - upload_data["data"]["fileName"] = reportname + config.upload_data["data"]["fileBase64"] = base64_data + config.upload_data["data"]["fileName"] = reportname token = get_head_auth_report() - upload_report_data(token, upload_data) + upload_report_data(token, config.upload_data) except TimeoutError as e: print(f"请求超时: {e}")