-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--live-reload
reloads on changes of database file
#501
Comments
Hi @SmithChart, Thanks for this bug-report. I think the cleanest and most extensible way to handle this would be to have a Lona setting named Another way would be a |
Hi @fscherf, I had skimmed though the commit introducing live reloading and I concluded that settings would not be available there. To be honest: I think to have this in the settings would be the best way to solve this. This would keep all settings in one place. Another idea would be to use |
Hi @SmithChart, I played around with some solutions, but the more I think about this, the more I think it is not an actual bug. |
Hey @fscherf, Adding a note to the documentation may make it a little more clear how it should be done. But it would probably be fine without this. |
Well, I've tested
--live-reload
on my current project. And I think I mostly like this feature :-) It mostly works as expected.But: I am using a sqlite3 database (with the Django ORM). This means every change made to the database will lead to an updated file inside my project repository. And this leads to Lona reloading.
Looking at the implementation it's totally clear why this happens.
But I think we could exclude a few extensions from the watch without loosing anything.
watchfiles
has filters in place: https://watchfiles.helpmanual.io/api/filters/#watchfiles.filters.DefaultFilter.ignore_entity_patternsI would suggest to add a
DefaultFilter
towatchfiles.run_process()
. And to add at least.sqlite3
to theignore_entity_patterns
list. If we keep our extensions to the filter list at a central place we could event update this list if new extensions come along that we do not want to watch.What do you think about this?
The text was updated successfully, but these errors were encountered: