My flow won't stop running in the background

I am very new to prefect and I was testing a flow that creates rows in a postgres table when I accidentally started the flow before setting an end date in the schedule. Now the flow won’t stop running and is continually adding data to my table. I am using Vscode and ran the flow thru the interactive window which uses jupyter.

How do I stop my flow from running forever? I have tried overwriting the flow to include an end_date in the schedule, have also tried doing control + c in the terminal, killing my terminal, restarting my python in the interactive window, and restarting vscode. The flow must be running somewhere that I can’t find.

If anyone has any help I would greatly appreciate it. I can’t find any resources in here or the slack about this issue!

1 Like

If you delete the flow run from the UI, the process should be canceled as well.

Hi @anna_geller, I tried to delete a flow run from the UI, which I run through a Process deployment, but the process seems to keep going.
Also, does setting the flow run in the “Cancelled” state through the set_flow_run_state() API result in the process being stopped as well?
Thank you for your support!

gotcha, we are working on first-class flow run cancellation, no ETA but subscribe to the Topics tagged release-notes and this should be available pretty soon

Great, thanks a lot! :slight_smile:

1 Like