FlexMeasures / flexmeasures

The intelligent & developer-friendly EMS to support real-time energy flexibility apps, rapidly and scalable.
https://flexmeasures.io
Apache License 2.0
144 stars 36 forks source link

Allow API users to cancel a scheduling job #577

Open Flix6x opened 1 year ago

Flix6x commented 1 year ago

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):

nhoening commented 1 year ago

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 commented 1 year ago

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

Flix6x commented 1 year ago

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

I missed that one. It is better.