mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
* Use Redis for ActiveJob and ActionCable * Fix alwaysApply setting * Update queue names and weights * Tweak weights * Update job queues * Update docker setup guide * Remove deprecated upgrade columns from users table * Refactor Redis configuration for Sidekiq and caching in production environment * Add Sidekiq Sentry monitoring * queue naming fix * Clean up schema
16 lines
355 B
Ruby
16 lines
355 B
Ruby
class DataCacheClearJob < ApplicationJob
|
|
queue_as :low_priority
|
|
|
|
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
|