4 Commits

Author SHA1 Message Date
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
Misaka_Company
8e4d5824c9 fix: add summary warning when all LAN sources are unreachable
When the network is down, sync_file() logs individual errors for each
file. Now run_once() detects when all files fail and emits a single
summary warning instead of proceeding with redundant "no changes" logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 16:33:54 +08:00
Misaka_Company
d224b98893 feat: unified logging module and remove redundant first_run logic
- Add logger.py with TimedRotatingFileHandler (daily rotation, 30-day retention)
- Replace all print() in migrate.py with logging calls
- Add logging to sync.py for sync status tracking
- Refactor watch.py to use logger.py, remove duplicate first_run branch
- All logs now go to logs/app.log consistently
- Add logging config section to config.yaml, add logs/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 13:56:23 +08:00
Misaka_Company
7edbd987f0 feat: add scheduled sync daemon and TRUNCATE migration mode
- Add sync.py for LAN file sync with atomic writes and mtime-based change detection
- Add watch.py daemon that periodically syncs files and migrates only changed tables
- Add TRUNCATE mode to migrate.py (--truncate flag) to preserve table structure
- Update config.yaml schema with check_interval_minutes and lan_sources
- Update README with new features documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 13:29:23 +08:00