Skip to content
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

feat(DataExport) Parallelize data export by splitting it into parts #2737

Merged
merged 9 commits into from
Oct 28, 2024

Conversation

nudded
Copy link
Contributor

@nudded nudded commented Oct 24, 2024

Context

When exporting lots of invoices, we're bumping into the limits of how fast we can export data.

Description

This PR introduces the concept of DataExportPart. It's a way for data exports to be split into many parts. These parts can then be handled by a single Sidekiq job. This allows a trivial way to split up the data export.

once the parts are done, they will be combined into the final export.

@nudded nudded changed the title Feat data export parts feat(DataExport) Parallelize data export by splitting it into parts Oct 24, 2024
@nudded nudded force-pushed the feat-data-export-parts branch 4 times, most recently from b28f23b to 3bbbc32 Compare October 25, 2024 11:29
@nudded nudded marked this pull request as ready for review October 25, 2024 11:29
Copy link
Contributor

@ancorcruz ancorcruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I have left you a few comments.

app/jobs/data_exports/export_resources_job.rb Show resolved Hide resolved
app/jobs/data_exports/combine_parts_job.rb Show resolved Hide resolved
app/jobs/data_exports/process_part_job.rb Show resolved Hide resolved
app/services/data_exports/process_part_service.rb Outdated Show resolved Hide resolved
app/services/data_exports/process_part_service.rb Outdated Show resolved Hide resolved
app/services/data_exports/csv/invoices.rb Show resolved Hide resolved
app/services/data_exports/csv/invoice_fees.rb Show resolved Hide resolved
@nudded nudded merged commit 21ad463 into main Oct 28, 2024
6 checks passed
@nudded nudded deleted the feat-data-export-parts branch October 28, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants