2248 make the uploading of a spreadsheet a background job#2310
Draft
kdp-cloud wants to merge 28 commits into
Draft
2248 make the uploading of a spreadsheet a background job#2310kdp-cloud wants to merge 28 commits into
kdp-cloud wants to merge 28 commits into
Conversation
Collaborator
kdp-cloud
commented
Sep 1, 2025
- Harmonizes the spreadsheet upload functionality and dynamic table functionality
- Makes adding / creating samples a background job when > 100 samples
- Closes Make the uploading of a spreadsheet a background job #2248
An error in the controller should be raised if the SampleBatchProcessor has errors.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces background job processing for large sample uploads to improve system performance and user experience. When uploading > 100 samples via spreadsheet, the system now processes them asynchronously instead of blocking the request.
- Refactors sample batch operations to use a new service class
SampleBatchProcessor - Adds background jobs for batch create/update operations when sample count exceeds 100
- Implements email notifications for background job completion
- Adds UI feedback and locking mechanisms during background processing
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
app/services/samples/sample_batch_processor.rb |
New service class to handle batch sample operations |
app/jobs/samples_batch_create_job.rb |
Background job for batch sample creation |
app/jobs/samples_batch_update_job.rb |
Background job for batch sample updates |
app/controllers/samples_controller.rb |
Refactored to use new service and jobs with 100-sample threshold |
app/controllers/single_pages_controller.rb |
Renamed upload action to preview_upload_samples |
app/models/sample_type.rb |
Added batch upload progress tracking |
app/views/single_pages/sample_upload_content.html.erb |
Updated UI to handle background jobs and improve error handling |
test/ files |
Updated tests to reflect new functionality and parameter structure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.