1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Clean up market data methods

This commit is contained in:
Zach Gollwitzer 2025-05-12 15:22:24 -04:00
parent efea7bfc01
commit 267692d297
2 changed files with 6 additions and 3 deletions

View file

@ -2,8 +2,6 @@ class SyncMarketDataJob < ApplicationJob
queue_as :scheduled
def perform(*args)
syncer = MarketDataSyncer.new
syncer.sync_exchange_rates
syncer.sync_prices
MarketDataSyncer.new.sync_all
end
end

View file

@ -20,6 +20,11 @@ class MarketDataSyncer
@account = account
end
def sync_all(full_history: false)
sync_exchange_rates(full_history: full_history)
sync_prices(full_history: full_history)
end
def sync_exchange_rates(full_history: false)
unless rate_provider
Rails.logger.warn("No rate provider configured for MarketDataSyncer.sync_exchange_rates, skipping sync")