Tanmoy Sarkar 220bbfe150 fix(companion): Only reload companion manager when its config changed
A SIGHUP web reload recycles HTTP workers and re-reads config, but with
--preload it does not re-import application code: the WSGI callable is
loaded once and cached, so running companions are already current.
Restarting the manager on every reload bounced all companions for
nothing, slowing the common fast-reload path Frappe relies on.

reload_companion_manager now rebuilds the companion configs and compares
their sorted config_hash against the running manager's. Unchanged ->
leave the manager and its companions running. Changed (field, added, or
removed name) -> restart the manager from the fresh cfg, as before.
Per-companion reread via the control socket is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 23:44:32 +05:30
..
2020-05-01 01:11:21 +02:00
2024-04-22 03:33:30 +02:00
2020-02-02 22:57:14 +01:00
2024-04-22 03:33:14 +02:00
2024-04-22 03:33:14 +02:00
2024-04-22 03:33:14 +02:00
2024-04-22 03:33:30 +02:00