Commit 1b31ff61 by hejiangming

更新记录表

parent bd92c00a
......@@ -170,5 +170,17 @@ if __name__ == '__main__':
# 9) 删除 copy 表(交换后 copy 表里是旧数据,留着没意义)
DBUtil.engine_exec_sql(engine, f"drop table if exists {export_tb_copy};")
# 10) 往流程看板表 workflow_everyday 写记录
# CommonUtil.modify_export_workflow_status: 是给"一个 page(页面) 由多个导出脚本共同产出"的场景用的——要等同组脚本全部完成才点亮看板。
# 分类词频这个 page 只有本脚本一个导出源(belonging_to_process=分类词频_month 组内独一份), 就直连
update_workflow_sql = f"""
REPLACE INTO selection.workflow_everyday
(site_name, report_date, status, status_val, table_name, date_type, page, is_end, remark, export_db_type, freeze_flag)
VALUES('{site_name}', '{date_info}', '导出PG数据库完成', 14, '{export_base_tb}', '{date_type}', '分类词频', '是', '分类词频数据', '{db_type}', NULL);
"""
mysql_engine = DBUtil.get_db_engine('mysql', 'us')
DBUtil.engine_exec_sql(mysql_engine, update_workflow_sql)
mysql_engine.dispose()
print(f"==================表 {export_table} 导出完成==================================")
print("success")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment