summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py b/packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py
index dfe7c78..5c52387 100644
--- a/packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py
+++ b/packages/meshbay-hub/src/meshbay_hub/tasks/cleanup.py
@@ -64,6 +64,12 @@ async def cleanup_loop(get_session):
quota = await mail.purge_expired_quota(db)
if quota:
log.info("Purged %d expired mail counters", quota)
+ # Every name anybody types at the sign-in form is a row,
+ # real or not; once its window has passed, nothing reads it.
+ from meshbay_hub import login_throttle
+ throttled = await login_throttle.purge_expired(db)
+ if throttled:
+ log.info("Purged %d expired sign-in counters", throttled)
except asyncio.CancelledError:
raise
except Exception as e: