Propose_state, set_flow_run_state causes main flow to abort

Hi everyone!

I am currently trying to resolve an issue with using either of the following functions to change a subflow to Failed():

  • propose_state

  • set_flow_run_state

I receive this error every time I am running a flow. Please see below…

Unexpected err=Abort(‘This run has already terminated.’), type(err)=<class ‘prefect.exceptions.Abort’>

I am executing queries from Postgres in a queue, so if one fails it will not go onto the next since this exception is raised.

Is anyone else facing this issue?

It says it was resolved in 2.0b2 on Github, but this failure stops the flow from continuing to the next item in the queue every time.