-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor transaction enrichment to support batch processing (#1803)
* Refactor transaction enrichment to support batch processing - Add method to enrich transactions in batches - Implement job scheduling for unenriched transactions - Improve logging and error handling for transaction enrichment * Re-enable enrichment * Fix transaction enrichment query to use correct table references - Update queries to explicitly join and reference account_entries and account_transactions tables - Remove unnecessary name presence check before enrichment - Improve query precision for unenriched transaction selection * Optimize transaction enrichment query joins - Refactor database joins to use explicit table references - Improve query performance for unenriched transaction selection - Ensure correct table aliasing in enrichment methods * Remove deprecated data enrichment job and method - Delete EnrichDataJob as it's no longer used - Remove `enrich_data_later` method from Account model - Update Account::Syncer to directly call `enrich_data` instead of scheduling a job
- Loading branch information
Showing
5 changed files
with
53 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class EnrichTransactionBatchJob < ApplicationJob | ||
queue_as :latency_high | ||
|
||
def perform(account, batch_size = 100, offset = 0) | ||
enricher = Account::DataEnricher.new(account) | ||
enricher.enrich_transaction_batch(batch_size, offset) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters