-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Refactor transaction enrichment to support batch processing #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add method to enrich transactions in batches - Implement job scheduling for unenriched transactions - Improve logging and error handling for transaction enrichment
- 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
- Refactor database joins to use explicit table references - Improve query performance for unenriched transaction selection - Ensure correct table aliasing in enrichment methods
@zachgoll let me know how this looks now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, functionality looks good now!
The last thing I'm thinking about here is whether we even need EnrichDataJob
anymore. All that job is doing now is:
- Calculating the number of batches
- Enqueueing the batch jobs
I'm thinking we could get rid of that entirely (the job itself) and do this work directly in account.enrich_data
.
So in total, we'd:
- DELETE
account.enrich_data_later
method - DELETE
EnrichDataJob
- 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
@zachgoll Good call. Updated. We good to push to production? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks good!
No description provided.