Move adding students in a Roster to a background job #2210
Description
Feature request ✨
Currently, we when add students to an existing Roster, we do it within the request-response cycle. So if someone uploads a large .csv
file or adds a large list of students, it takes a long time for the upload to happen. Also if there's a timeout or an error in adding those entries, we rollback all of them, which also takes a lot of time.
Moving this process to a background job would be a much better UX for the user and also reduce response times.
The steps involved in doing so would be:
- Move
.create_entries
to a background job. - Setup
ActionCable
channel for sending progress report to the user. - Handle invalid entries.
In the first iteration, we could move the process to a background job and just send a flash message on the lines of "We are adding students to your roster, please check in sometime".
And in the future iterations we can add the ActionCable
support.
cc: @andrewbredow @d12