06/01 Review and optimize on UI/UX, security, and functionality

This commit is contained in:
2026-06-01 15:33:28 -04:00
parent 3d0ebc92c6
commit 8ca54827b2
6 changed files with 258 additions and 137 deletions
+7 -1
View File
@@ -53,8 +53,14 @@ def process_due_rules(dry_run=False):
db.session.commit()
continue
# Create transaction for each missed occurrence up to today
# Create transaction for each missed occurrence up to today.
# Cap catchup at 90 days to prevent runaway loops on long-dormant rules.
catchup_floor = today - timedelta(days=90)
run_date = rule.next_run or rule.start_date
if run_date < catchup_floor:
log.warning('[recurring] rule "%s" is >90 days overdue; starting catchup from %s',
rule.description, catchup_floor)
run_date = catchup_floor
affected_accounts = set()
while run_date <= today: