MCPTap v2.5.3 #11
pczerkas
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
[2.5.3]
Added
SQLite log retention via background asyncio task — a new
LogRetentionTaskruns every hour inside the aiohttp event loop anddeletes log entries older than
MCP_TAP_LOG_RETENTION_DAYS(default 30).The task is wired into the application lifecycle (
on_startup/on_cleanup) alongside the existingConfigReloader, and gracefullysurvives transient purge errors (logs and continues).
settings.py— new fieldlog_retention_days(envMCP_TAP_LOG_RETENTION_DAYS, default30).log_store.py— new methodLogStore.purge_old(retention_days)that executes
DELETE FROM request_logs WHERE timestamp < ?andreturns the number of deleted rows.
log_retention.py— new module withLogRetentionTaskclass.app.py—_start_log_retention/_stop_log_retentionlifecyclehooks; skipped when log store is disabled.
Tests:
tests/test_log_store.pyaddsTestPurgeOld(4 tests — deletesold entries only, returns 0 when nothing to delete / when disabled,
deletes all when retention is 0).
tests/test_log_retention.py(5tests — purge_once, disabled store, start/stop lifecycle, purge in loop,
error resilience).
Full Changelog
v2.5.2...v2.5.3
This discussion was created from the release MCPTap v2.5.3.
All reactions