mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-25 08:09:38 +02:00
Isolate infinite loop bug, add timeout to actions (#583)
* Isolate infinite loop bug, add timeout to actions * Increase timeout to allow for temporary failure * Set correct timeout, implement temporary fix * Trigger syncs at controller layer
This commit is contained in:
parent
2d406274ac
commit
b1bfdef8ff
7 changed files with 36 additions and 20 deletions
|
@ -3,7 +3,6 @@ class Valuation < ApplicationRecord
|
|||
|
||||
belongs_to :account
|
||||
validates :account, :date, :value, presence: true
|
||||
after_commit :sync_account
|
||||
monetize :value
|
||||
|
||||
scope :in_period, ->(period) { period.date_range.nil? ? all : where(date: period.date_range) }
|
||||
|
@ -11,9 +10,4 @@ class Valuation < ApplicationRecord
|
|||
def self.to_series
|
||||
TimeSeries.from_collection all, :value_money
|
||||
end
|
||||
|
||||
private
|
||||
def sync_account
|
||||
self.account.sync_later
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue