Reduce default poll time and add DM ack clearing to standard poll

This commit is contained in:
Jack Kingsman
2026-02-23 20:00:42 -08:00
parent 7306627ac7
commit b9de3b7dd7
3 changed files with 12 additions and 7 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ import pytest
from app.database import Database
from app.event_handlers import (
_active_subscriptions,
_cleanup_expired_acks,
_pending_acks,
cleanup_expired_acks,
register_event_handlers,
track_pending_ack,
)
@@ -81,7 +81,7 @@ class TestAckTracking:
_pending_acks["expired"] = (1, time.time() - 100, 1000) # Created 100s ago, 1s timeout
_pending_acks["valid"] = (2, time.time(), 60000) # Created now, 60s timeout
_cleanup_expired_acks()
cleanup_expired_acks()
assert "expired" not in _pending_acks
assert "valid" in _pending_acks
@@ -92,7 +92,7 @@ class TestAckTracking:
# 2x buffer = 20 seconds, so should NOT be expired yet
_pending_acks["recent"] = (1, time.time() - 5, 10000)
_cleanup_expired_acks()
cleanup_expired_acks()
assert "recent" in _pending_acks