Sunil Mohan Adapa d5f22a8755
web_server: Restart in development mode only for source code changes
Helps: #2534.

- When a module change is detected. Don't restart. Restart only when FreedomBox
source code is changed. This prevents unwanted restarts when Python standard
library is updated during an app's installation.

- This will make functional tests more robust as during functional tests,
freedombox service run in development mode.

- This may lead to annoyances during development when we have to restart the
service manually. This is unlikely but if it happens we can tweak the setting by
maintaining the allow list of modules instead of deny list of modules.

Tests:

- Calibre installation which brings in new version of python standard library
works without causing CherryPy to detect python module changes during 'apt-get
install'.

- Changing a source code file under the plinth/ directory leads to the service
getting automatically restarted.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-01 23:14:16 +05:30
..
2025-08-18 20:59:28 -04:00
2025-08-16 22:39:18 +05:30