Persist URL dedup cache to SQLite (bounded, ~KB); keep video blobs in memory
Switch storage backend from in-memory to SQLite (silences the library warning). recent_urls (the edit-redelivery dedup map) now survives restarts: it's tiny and TTL-bounded, stored via the library KV store, with wall-clock timestamps and prune-on-load. last_video is deliberately NOT persisted — each value is a base64 video up to ~133 MB, so persisting it would bloat the DB; it stays in memory. DB lives at bot-state.db (gitignored). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vendored
+4
@@ -8,6 +8,10 @@ signal-cli-data.bak.*
|
||||
# Local service file (contains your phone number) — use signal-bot.service.example
|
||||
signal-bot.service
|
||||
|
||||
# Runtime state (SQLite dedup cache) — created next to bot.py at runtime
|
||||
bot-state.db
|
||||
bot-state.db-*
|
||||
|
||||
# Python
|
||||
venv/
|
||||
__pycache__/
|
||||
|
||||
Reference in New Issue
Block a user