diff --git a/CloudronManifest.json b/CloudronManifest.json index e7afc87..ec5990e 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -15,7 +15,7 @@ "sendmail": {}, "scheduler": { "membership_sweep": { - "schedule": "0 3 * * *", + "schedule": "0 3,11,19 * * *", "command": "/app/code/sweep.sh" }, "rag_refresh": { diff --git a/app/main.py b/app/main.py index 4b2aa8c..29b7e16 100644 --- a/app/main.py +++ b/app/main.py @@ -3973,9 +3973,10 @@ async def index(): # Generic on purpose: the balance can be short because the monthly allowance is spent, # because purchased credit is spent, or a mix — the letter says "balance" so it is true -# either way. The trigger is an absolute floor, not a percentage, so it means the same -# thing to a member on a $15 allowance and a member on $35. -BUDGET_LOW_WATER = float(os.environ.get("BUDGET_LOW_WATER", "2.00")) +# either way. The trigger is proportional — 90% of the balance used — so it means the same +# thing to a member on $15 and one on $35: the letter arrives when roughly a tenth is left, +# on whichever sweep follows, rather than at an arbitrary absolute amount. +BUDGET_NOTICE_AT = float(os.environ.get("BUDGET_NOTICE_AT", "0.90")) PINE_LOGO_SVG = """