Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prune old messages by max_storage config, update logs and metrics #20

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

hopeyen
Copy link
Contributor

@hopeyen hopeyen commented Sep 19, 2023

Description

  • add user config for msg pruning (default to 3000) every 30seconds
  • keep the newest max_storage messages and prune all the old ones regardless radio message type
  • add pruned_messages gauge metrics
  • updated logs

This PR should prevent storing too many messages in the db and causing congestion to the radio

Issue link (if applicable)

Resolves #19 and helps with #15

Tested locally

@hopeyen hopeyen self-assigned this Sep 19, 2023
@hopeyen hopeyen added type:feature New or enhanced functionality size:medium Medium p2 Medium priority labels Sep 19, 2023
@hopeyen hopeyen merged commit 0ce8b5b into dev Sep 19, 2023
1 check passed
@hopeyen hopeyen deleted the hope/msg-pruning branch September 19, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 Medium priority size:medium Medium type:feature New or enhanced functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat.Req] Pruning msgs from db
1 participant