What happens after you click Cancel?
Here’s what I’d check when cancelling a slow export, from the worker and partial file to what the person waiting sees.
I follow the click to the worker
When I review a background job, I want to know what happens after the person clicks Cancel. Take a slow report export. The screen can acknowledge the request while the worker is still writing a batch of rows. Showing “Cancelling” gives the person an honest update while the export reaches a point where it can stop.
Check again before making the file available
I’d keep the export private while it’s being written. The worker checks for cancellation between batches and checks again in the same update that records completion and makes the download available. If cancellation wins, the worker stops and handles the temporary file before the screen shows “Cancelled”. If completion wins, the screen shows “Completed” and offers the finished file.
Try it halfway through and just before the end
- Use sample data and pause the export between two batches. Click Cancel and reload. Check that the screen still shows the pending request.
- Let the worker continue. Check that the next batch never starts and that the partial file never appears as a download.
- Repeat at the end. In one run, cancel just before the finished file becomes available. In another, cancel just after. Check that the final status and download agree in both runs.