trustification / trustify

Apache License 2.0
8 stars 15 forks source link

feat: allow canceling import runs #502

Closed ctron closed 1 week ago

ctron commented 1 week ago

I think what might make sense for the UI is to no override the current state with the "disabled" badge. When the configuration is disabled, the importer might run up until the next point of checking. So it would be disabled but still running. At least for up to 1 minute.

bobmcwhirter commented 1 week ago

Can we have a "stopping" state?

ctron commented 1 week ago

Can we have a "stopping" state?

Tricky. I would say: disabled + running => stopping.

The problem is that there is no state machine. Adding a state machine like that would mean to use op-locks in addition, in order to advance the state. And what happens when the job gets re-enabled during "stopping".

Right now its a job running, and a "disabled" flag. One is controlled by the server, the other by the user. And that's it.

carlosthe19916 commented 1 week ago
ctron commented 1 week ago

When you disable it, it will be canceled when it's running.