Fix: seen_events TTL-Bereinigung und Log-Rotation - #9
Open
Sleepwalker86 wants to merge 1 commit into
Open
Conversation
- seen_events von set auf dict umgestellt: jeder Eintrag speichert den Zeitstempel des ersten Empfangs; cleanup_seen_events() läuft stündlich und entfernt Einträge älter als 24 h (SEEN_EVENTS_TTL_SECONDS). - Log-Rotation via RotatingFileHandler: rotiert bei 5 MB, behält 3 Backup-Dateien (log.txt.1 – log.txt.3). - Version auf 4.1.0 erhöht. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zusammenfassung
setwuchs bei Langzeitbetrieb unbegrenzt, weil Einträge nie entfernt wurden. Umgestellt auf eindict, das pro Eintrag den Zeitstempel des ersten Empfangs speichert. Die neue Coroutinecleanup_seen_events()läuft stündlich und löscht alle Einträge, die älter als 24 Stunden sind (SEEN_EVENTS_TTL_SECONDS).logging.basicConfigersetzt durchRotatingFileHandler— rotiert automatisch bei 5 MB und behält 3 Backup-Dateien (log.txt.1bislog.txt.3). Dielog.txtwuchs bisher unbegrenzt.4.1.0erhöht.Geänderte Dateien
main.pyTest
seen_events: X abgelaufene Einträge entfernt.im Log erscheintlog.txt.1wird automatisch angelegt🤖 Generated with Claude Code