Closed ctron closed 1 week ago
Can we have a "stopping" state?
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.
PUT /api/importer/{name}
and set state=cancel
or similar action? If this is the way, does it mean I can also do PUT state=running|waiting,etc
?When you disable it, it will be canceled when it's running.
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.