Forums

stop web app ?

How do you stop a flask web app? I don't want to delete anything I just want the server to stop running my script. Can I do that?

If you delete the web app from the "Web" tab, that will delete the app but won't delete any of your code. Would that be enough?

OK, but when you restart the web app you'd need to change the name of the original file to the new one or the new one will overwrite the old one if you use the same name. Is that correct? Not a big deal really, just wondered if there was another way to do this.

That's a good point, you'd have to be careful. One other suggestion -- if you don't mind the site serving up an error, you could just edit the WSGI file and put a syntax error into it. That would be quick and easy to reverse later.

When you delete the web app from the "Web" tab, all other settings (virtualenv, urls...) are deleted as well. So when you re-create it, you have to set them up again. (Did that just now.)

Hence deleting an app is not the best solution to stop it temporarily. It would be great to have a "Stop" button next to a "Reload" one on the "web" tab.

Got it -- thanks for pointing that out. I'll add that to our to-do list.

+1, I also think it would be super useful to have a ''stop" button in the Web tab.

Thanks! Upvoted on our feature tracker

So when is that stop button coming? Need it for testing monitoring!

"At some point", is really all we can say right now.

Any news on this?

No. We'll post in this thread to let you know when it's done.

@PaulA Disable button was deployed today. Thanks!

I deployed one flask app and then deleted it now, when I deploy a new Flask app, the wsgi is using the same path to load the files. I changed them manually but still running on the old configuration. It is showing import erros.

Did you reload the web app after changing the configuration?