Thanks for your feedback! That is helpful.
Ok, I’ve now gone through the link you included. So if I use the default port of 8050, then with this
if __name__ == '__main__':
app.run_server(debug=True, host='0.0.0.0')
by
you need to actually post to this endpoint
do you mean I need a separate file app_helper.py
with this
import requests
r = requests.post('http://127.0.0.1:8050')
How would this app_helper.py
file know to use the task shutdown
? Also, is there a way to specify a delay of 20 seconds before shutting down - would time.sheep(20)
go before shutdown_server()
?