mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
Clarify backend data pipeline naming concepts (importers, processors, materializers, calculators, and syncers) (#2255)
* Rename MarketDataSyncer to MarketDataImporter * Materializers * Importers * More reference replacements
This commit is contained in:
parent
b8903d0980
commit
10f255a9a9
18 changed files with 165 additions and 163 deletions
|
@ -1,4 +1,4 @@
|
|||
class Balance::Syncer
|
||||
class Balance::Materializer
|
||||
attr_reader :account, :strategy
|
||||
|
||||
def initialize(account, strategy:)
|
||||
|
@ -6,9 +6,9 @@ class Balance::Syncer
|
|||
@strategy = strategy
|
||||
end
|
||||
|
||||
def sync_balances
|
||||
def materialize_balances
|
||||
Balance.transaction do
|
||||
sync_holdings
|
||||
materialize_holdings
|
||||
calculate_balances
|
||||
|
||||
Rails.logger.info("Persisting #{@balances.size} balances")
|
||||
|
@ -23,8 +23,8 @@ class Balance::Syncer
|
|||
end
|
||||
|
||||
private
|
||||
def sync_holdings
|
||||
@holdings = Holding::Syncer.new(account, strategy: strategy).sync_holdings
|
||||
def materialize_holdings
|
||||
@holdings = Holding::Materializer.new(account, strategy: strategy).materialize_holdings
|
||||
end
|
||||
|
||||
def update_account_info
|
Loading…
Add table
Add a link
Reference in a new issue