Recurring fixes (#454)

* Fix record violation

and add toggle for recurring feature

* Run only once per sync cycle ( 30 sec )

* FIX params passing

* Add collapsible to recurring section

* FIX preferences error catch
This commit is contained in:
soky srm
2025-12-17 16:03:05 +01:00
committed by GitHub
parent 7d5b0c425c
commit 0300bf9c24
16 changed files with 403 additions and 110 deletions

View File

@@ -37,7 +37,14 @@ class RecurringTransaction < ApplicationRecord
scope :expected_soon, -> { active.where("next_expected_date <= ?", 1.month.from_now) }
# Class methods for identification and cleanup
# Schedules pattern identification with debounce to run after all syncs complete
def self.identify_patterns_for(family)
IdentifyRecurringTransactionsJob.schedule_for(family)
0 # Return immediately, actual count will be determined by the job
end
# Synchronous pattern identification (for manual triggers from UI)
def self.identify_patterns_for!(family)
Identifier.new(family).identify_recurring_patterns
end