Closed R-fred closed 2 years ago
Sure its not browser cache?
I am seeing similar behaviour running a script on replit. Changing code and rerunning the replit does not change what is shown in the browser. I have tried force reloading and cache emptying, both in Safari and Chrome.
But if I run the replit once with local=True, and then again without it, the page refreshes to show the updated content.
It's because Pglet server keeps running when the connection between Python client and server is interrupted. Currently, it relies on timeout to determine if the client is disconnected and the page along with its sessions must be destroyed.
We are working on a new version Python client which will be sending "disconnect" message when terminated with CTRL+C.
Thank you for the update. That would seem a very useful feature, considering the rapid feedback loop needed for UI development.
Overall, I have high hopes for pglet to finally be the "no pain" rapid Python web development solution we have been missing.
On further experimentation, it seems that Stop - Start - Reload (in Replit "browser window") reliably picks up the latest changes, so it does not share the issue with pglet-hosted pages. 👍🏻
@FeodorFitsner , any timeline for the new pglet-python? I have been looking forward to it for the last 5 months :-)
It's been fixed in the latest Python client release.
With the pglet server being now included in the python, I noticed that I have to kill the pglet app manually to be able to load a new version of the app. Loading a different page in between also seems to work.
Typical workflow: