Files
Excel-to-SQL_Server/config.yaml.example
Misaka_Company 493621c440 feat: add Uptime Kuma heartbeat monitoring
- Add heartbeat configuration to config.yaml
- Implement HeartbeatMonitor class in watch.py
- Send heartbeat every 40 seconds to Uptime Kuma push endpoint
- Update config.yaml.example with heartbeat settings
- Add heartbeat logging at INFO level

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 15:05:21 +08:00

131 lines
3.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Excel to SQL Server Migration Configuration
# ================= 定时检查参数 =================
check_interval_minutes: 5 # 每隔多少分钟扫描一次源文件
# ================= 日志配置 =================
logging:
level: "INFO" # DEBUG / INFO / WARNING
log_dir: "logs" # 日志目录(相对于项目根目录)
max_keep_days: 7 # 日志文件保留天数
# ================= Uptime Kuma 心跳检测 =================
heartbeat:
enabled: false # 是否启用心跳检测
interval_seconds: 40 # 心跳发送间隔(秒)
url: "YOUR_UPTIME_KUMA_PUSH_URL" # Uptime Kuma 推送端点 URL
# ================= LAN 源文件路径 =================
# key = 本地相对路径 (对应 tables.sources[].file)
# value = 局域网 UNC 绝对路径
lan_sources:
"PG/生产执行卡2022.xlsm": "\\\\192.168.110.113\\生产执行卡\\往年生产执行卡\\生产执行卡2022.xlsm"
# ... 其他 LAN 源文件路径
# ================= SQL Server 连接 =================
sql_server:
driver: "ODBC Driver 18 for SQL Server"
server: "192.168.110.114"
database: "CompanyDB"
username: "YOUR_USERNAME_HERE"
password: "YOUR_PASSWORD_HERE"
TrustServerCertificate: "yes"
# ================= 目标 Schema =================
schema: "executionCard"
# ================= 批量插入参数 =================
batch_size: 500
# ================= 主键列名(用于去重) =================
primary_key: "总排号"
# ================= 列名重映射 =================
# 读取 Excel 时将原始列名替换为目标列名
column_mapping:
"ID": "CRM订单明细ID"
# ================= 数据类型推断规则 =================
type_rules:
datetime:
- "日期"
- "Date"
int:
- name: "数量"
exact: true
decimal:
- name: "单价"
exact: true
long_text:
- "备注"
- "技术参数"
- "说明"
- "转换数据"
- "新参数"
primary_key_type: "NVARCHAR(50) NOT NULL"
default_type: "NVARCHAR(MAX)"
# ================= 数据源映射 =================
# 每个条目对应一个目标表
# sources 中的顺序决定去重优先级:后出现的覆盖先出现的(同总排号时)
tables:
# ---------- 压力表 (PG) ----------
- table: "PG_2022"
sources:
- file: "PG/生产执行卡2022.xlsm"
sheet: "Sheet1"
- table: "PG_2023"
sources:
- file: "PG/生产执行卡20231-5月.xlsm"
sheet: "Sheet1"
- file: "PG/生产执行卡2023(6月-.xlsm"
sheet: "Sheet1"
- table: "PG_2024"
sources:
- file: "PG/生产执行卡2024 6月.xlsm"
sheet: "重庆数据"
- file: "PG/生产执行卡2024 6月.xlsm"
sheet: "北京数据"
- table: "PG_2025"
sources:
- file: "PG/生产执行卡2025年.xlsm"
sheet: "重庆数据"
- file: "PG/生产执行卡2025年.xlsm"
sheet: "北京数据"
- table: "PG_2026"
sources:
- file: "PG/生产执行卡2026年.xlsm"
sheet: "重庆数据"
- file: "PG/生产执行卡2026年.xlsm"
sheet: "北京数据"
# ---------- 温度计 (TM) ----------
- table: "TM_2022"
sources:
- file: "TM/生产执行卡(2022合同数据).xlsm"
sheet: "数据"
- table: "TM_2023"
sources:
- file: "TM/生产执行卡(2023合同数据).xlsm"
sheet: "数据"
- table: "TM_2024"
sources:
- file: "TM/生产执行卡(新版1).xlsm"
sheet: "数据"
- table: "TM_2025"
sources:
- file: "TM/生产执行卡2025.xlsm"
sheet: "数据"
- table: "TM_2026"
sources:
- file: "TM/生产执行卡2026.xlsm"
sheet: "数据"