mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-10-22 05:52:10 +00:00
Add data retention configuration and cleanup functionality
- Introduced a new `[Data_Retention]` section in `config.ini.example` to manage retention periods for various database tables, including packet stream, daily stats, and observed paths. - Updated `mkdocs.yml` and `configuration.md` to include documentation for the new data retention settings. - Implemented data retention cleanup methods in `mesh_graph.py`, `repeater_manager.py`, and `scheduler.py` to enforce retention policies automatically. - Enhanced the web viewer's data cleanup logic to utilize the new retention settings, ensuring efficient database management.
This commit is contained in:
1 parent
513d1ec65b
commit
fcfde7ea33
9 files changed
+233
-8
No files matched your search
@@ -625,6 +625,25 @@ track_command_details = true
|
||||
# false: Keep actual user IDs in stats
|
||||
anonymize_users = false
|
||||
|
||||
[Data_Retention]
|
||||
# Data retention controls how long the bot keeps data in the database.
|
||||
# The scheduler runs cleanup daily so retention is enforced even when the
|
||||
# standalone web viewer is not running. Shorter retention reduces DB size.
|
||||
#
|
||||
# Packet stream (web viewer real-time display and transmission_tracker)
|
||||
# 2-3 days is enough for most deployments; 7 days if you need longer history.
|
||||
packet_stream_retention_days = 3
|
||||
#
|
||||
# Repeater/stats tables: daily_stats, unique_advert_packets, observed_paths
|
||||
daily_stats_retention_days = 90
|
||||
observed_paths_retention_days = 90
|
||||
#
|
||||
# Purging log (audit trail for repeater purges)
|
||||
purging_log_retention_days = 90
|
||||
#
|
||||
# Mesh connections (path graph edges). Should be >= Path_Command graph_edge_expiration_days.
|
||||
mesh_connections_retention_days = 7
|
||||
|
||||
[Path_Command]
|
||||
# Enable or disable the path command
|
||||
enabled = true
|
||||
|
||||
Reference in new issue
Block a user