06/18 Phase 7
This commit is contained in:
@@ -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).")
|
||||
|
||||
Reference in New Issue
Block a user