Files
BLD_sync/config/app_settings.py
Misaka_Company f6580b4994 refactor: remove Excel migration pipeline; keep Access-only sync
Drop the Excel (.xlsm) production-execution-card pipeline now that the
project only synchronizes Access databases to SQL Server.

- Delete excel_sync_to_sql.py, migration.py, config/field_mappings.py
- Remove Excel-only config symbols (EXCEL_CONFIGS, MIGRATION_TASKS,
  EXECUTION_CARD_FIELDS, CONTRACT_DATA_*, CACHE_DIR, TEMP_DIR,
  EXCEL_SYNC_* settings) from the config package
- Drop now-unused deps from requirements.txt: pandas, sqlalchemy, openpyxl
- Update .env.example, CLAUDE.md, and the uptime_kuma_utils docstring
- Fix the tube-bending workshop Access table mapping in SYNC_MAPPING
  (source table renamed; old name no longer exists)

The three Excel-sourced tables in warehouseOutbound (executionCardData,
contractData, customerProductType) and their data are left untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 13:09:36 +08:00

42 lines
1.1 KiB
Python

# config/app_settings.py
# 应用设置配置
import os
# ================= 日志表配置 =================
# 从原 config.py 抽取
LOG_TABLE_CONFIG = {
'schema': 'dbo',
'table_name': 'TableChangeLog',
'col_log_id': 'LogID',
'col_table_name': 'TableName',
'col_record_id': 'RecordID',
'col_address': 'TableAddress',
'col_synced': 'Synced'
}
# ================= ntfy 配置 =================
# 从原 config.py 抽取
NTFY_CONFIG = {
'enabled': True,
'server_url': os.environ.get('NTFY_SERVER_URL', ''),
'topic': os.environ.get('NTFY_TOPIC', ''),
'token': os.environ.get('NTFY_TOKEN', ''),
'priority': {
'error': 'high',
'critical': 'urgent'
}
}
# ================= Uptime Kuma 心跳配置 =================
# 增量同步服务心跳
UPTIME_KUMA_CONFIG = {
'enabled': True,
'push_url': os.environ.get('UPTIME_KUMA_PUSH_URL', ''),
'heartbeat_interval': 59 # 心跳间隔(秒),需要与 Uptime Kuma 设置一致
}
# ================= 运行参数 =================
POLL_INTERVAL = 30 # 轮询间隔(秒)
BATCH_SIZE = 10000 # 批量处理大小