Skip to main content

spawn_settings_watcher

Function spawn_settings_watcher 

Source
pub fn spawn_settings_watcher(
    pool: Arc<FsWatchPool>,
    config_watcher: Arc<ConfigState>,
    event_bus: Arc<EventBus>,
)
Expand description

Subscribe to settings.json via the shared FsWatchPool and broadcast config updates to all WebSocket clients on change.

Fire-and-forget — the returned subscription never needs to be unsubscribed (settings.json is watched for the app’s entire lifetime), so unlike the pre-migration version there’s no watcher handle for the caller to keep alive: the pool itself owns that now.