Skip to content

Conversation

kdp-cloud
Copy link
Collaborator

@kdp-cloud kdp-cloud added this to the 1.17.1 milestone Sep 1, 2025
@kdp-cloud kdp-cloud self-assigned this Sep 1, 2025
@kdp-cloud kdp-cloud added the datahub belgiumHub project label Sep 1, 2025
@kdp-cloud kdp-cloud moved this to Coded in DataHub Sep 1, 2025
@kdp-cloud kdp-cloud moved this to In review in SEEK 1.17.x Sep 1, 2025
@kdp-cloud kdp-cloud marked this pull request as ready for review September 1, 2025 06:34
@kdp-cloud kdp-cloud requested a review from Copilot September 1, 2025 08:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@kdp-cloud kdp-cloud linked an issue Sep 10, 2025 that may be closed by this pull request
@kdp-cloud kdp-cloud marked this pull request as draft September 24, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datahub belgiumHub project enhancement
Projects
Status: In review
Status: In review
Development

Successfully merging this pull request may close these issues.

Make the uploading of a spreadsheet a background job
1 participant