flexmeasures icon indicating copy to clipboard operation
flexmeasures copied to clipboard

Allow API users to cancel a scheduling job

Open Flix6x opened this issue 2 years ago • 3 comments

This feature would enable users to cancel a potentially large scheduling job in case they no longer have a need for its results (e.g. they got new information they want to have taken into account, and intend to trigger a new schedule).

I'd suggest the following logic under [DELETE] sensors/(id)/schedules/trigger with a single JSON argument (the job's uuid):

  • A job in the scheduling queue could be cancelled like this.
  • A job already in execution may possibly be cancelled like this.

Flix6x avatar Jan 04 '23 15:01 Flix6x

If #574 happens, we might also have to remove/update the latest schedule ID / flex model, unless this is only written after a job is computed.

nhoening avatar Jan 04 '23 15:01 nhoening

Isn't this in-built RQ solution better for canceling an ongoing job?

nhoening avatar Jan 04 '23 15:01 nhoening

Isn't this in-built RQ solution better for canceling an ongoing job?

I missed that one. It is better.

Flix6x avatar Jan 04 '23 15:01 Flix6x