Skip to content

Conversation

@macpie
Copy link
Member

@macpie macpie commented Aug 12, 2025

Summary

Adds automatic cleanup for netid_stats, removing entries older than 24 hours.

Changes

  • Added cleanup_old/0 to delete stale ETS rows via ets:select_delete/2.
  • Spawn hourly background process in init/0 to run cleanup automatically.
  • Log number of deleted entries.

Benefit

  • Prevents unbounded ETS growth and keeps only recent stats for better performance.
  • Create a window of time for stats.

@macpie macpie changed the title Cleanup netid_stats after 24 hours Cleanup netid_stats entries older than 24 hours Aug 12, 2025
@macpie macpie merged commit 7e4554d into main Aug 18, 2025
17 checks passed
@macpie macpie deleted the macpie/netid_stats_v2 branch August 18, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants