mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
* feat: Allow admins to delete family data * feat: Allow self-hosting users to delete cached data * Remove system tests
16 lines
350 B
Ruby
16 lines
350 B
Ruby
class DataCacheClearJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(family)
|
|
ActiveRecord::Base.transaction do
|
|
ExchangeRate.delete_all
|
|
Security::Price.delete_all
|
|
family.accounts.each do |account|
|
|
account.balances.delete_all
|
|
account.holdings.delete_all
|
|
end
|
|
|
|
family.sync_later
|
|
end
|
|
end
|
|
end
|