mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 06:54:07 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user