offspot / imager-service

Create Kiwix Hotspot microSD cards online
https://imager.kiwix.org/
GNU General Public License v3.0
11 stars 6 forks source link

Deleting task while it is creating does not cancel job #294

Closed Popolechien closed 5 months ago

Popolechien commented 2 years ago

I deleted (rather than cancel) a task while it was in the process of creating an image. It left the installer working on a ghost image instead of moving on the the next order.

Deleting a task should therefore imply canceling it first.

rgaudin commented 2 years ago

In theory, yes but Order deletion is not a common feature. It's an admin-only feature that should be used solely to clean up erroneous Orders. It should be used only exceptionally.

It doesn't trigger anything, it just deletes data.

Cancelling a task is fundamentally opposed to Order removal as canceling is asynchronous: an Order canceled requests task cancellation which happens in the future. Only after tasks and order are completely canceled (and user informed) can the data be deleted.

Implementing this properly for a feature that should normally not be used is probably not worth the effort… at this stage.

Popolechien commented 2 years ago

Fair enough. I've done the mistake once so should know better for next time, but I'd like to leave this ticket open as it is important to have safeguards.

rgaudin commented 5 months ago

Won't fix. we should not delete in-progress orders