Does anyone see the error that, if we add additional returned values in callback functions, and if the user doesn’t refresh the app, it will show errors as:
“Callback Function not found in output …” and “perhaps you forgot to prepend the “@”…”. Can someone please suggest a good way to solve this? or is there a way to auto refresh a stale page of the user? Thank you!
If you change the code of the app, it must be reloaded in client side, the usual way is indeed that the user refresh the page.
If you want it automatic, you can use app.run(dev_tools_hot_reload=True)
But as the name suggests, it is meant to be a dev feature, as the client will send a request to the server at regular interval to check if something changed (every 3 sec by default, that can be modified with the parameter dev_tools_hot_reload_interval)
Thank you so much again @Skiks. This is indeed the solution. Also, want to mention that when I do this in Gunicorn, seems it is required to set up via environment variable.
However, is there a way that the web page is refreshed when the gunicorn command is run, without any file/code change? Thanks!