Commit Graph
1 Commits
Author SHA1 Message Date
Claude 79088ff0ef feat(fanout): add a master switch that stops the xc_fanout daemon
settings.fanout_enabled (migration 027, default on) is a new "Fanout
Delivery" toggle beside the other fanout settings. Streaming\Fanout\FanoutMode
reads it and applies it to a node:

- Off: FanoutMode::applyToNode() writes bin/xc_fanout/disabled, then stops
  run.sh (so it cannot respawn the daemon) and then xc_fanout. It runs on
  MAIN when the settings are saved, and on every node from RootSignalsCronJob
  within a minute. The RootSignals keepalive and the hourly fanout_binary
  self-heal skip the daemon while the flag is set; `service boot` and run.sh,
  which cannot read settings, check the flag file.
- Every daemon-facing gate honours the switch. LicenseGate::fanoutUsable()
  and each FanoutClient control-socket call behave as if the daemon were
  down. IngestFeeder::forStream() returns a no-op feeder, and DelayCommand
  stops queueing segments for it. fanout_sync stops writing the daemon
  config and closes the pid-0 connection rows the stopped daemon left.
- The dashboard no longer reports "xc_fanout down" when it was switched off.

The pre-fanout delivery paths for fanout off follow in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Es8UhyPS8MNjuYTagqfGWi
2026-09-25 10:07:46 +00:00