06/18 Phase 7

This commit is contained in:
2026-06-18 09:29:33 -04:00
parent d1383a9835
commit d54e5e2127
16 changed files with 563 additions and 8 deletions
+14
View File
@@ -163,3 +163,17 @@ def _register_cli(app):
from app.services.billing import reconcile_subscriptions
checked, fixed = reconcile_subscriptions()
print(f"Reconciled {checked} subscription(s), fixed {fixed}.")
@app.cli.command("warn-expiring-listings")
def warn_expiring_cmd():
"""Nightly: email owners of listings expiring within 3 days."""
from app.services.expiry_notifications import warn_expiring
n = warn_expiring(days=3)
print(f"Sent {n} expiry warning email(s).")
@app.cli.command("notify-expired-listings")
def notify_expired_cmd():
"""Nightly: email owners of newly-expired listings."""
from app.services.expiry_notifications import notify_expired
n = notify_expired()
print(f"Sent {n} expiry notification email(s).")