feat(server): DISABLE_FEDERATION_WORKERS env gate for test isolation

This commit is contained in:
Jannis Braun
2026-05-03 22:51:06 +02:00
parent 2b0f93ec62
commit 3dbf4dab5e
+11 -2
View File
@@ -164,8 +164,17 @@ async function main(): Promise<void> {
// Register WS-layer call relay hooks (ring-timeout fan-out). // Register WS-layer call relay hooks (ring-timeout fan-out).
registerCallRelayHooks(); registerCallRelayHooks();
// Start federation background workers (outbox delivery, file download, health check) // Start federation background workers (outbox delivery, file download, health check,
startFederationWorkers(); // storage janitor, federated-call sentinel). Skip when DISABLE_FEDERATION_WORKERS is
// set to '1' or 'true' (matches envBool semantics in config.ts; used by integration
// tests to keep two-instance harnesses quiet).
const disableWorkers = process.env.DISABLE_FEDERATION_WORKERS === '1'
|| process.env.DISABLE_FEDERATION_WORKERS === 'true';
if (disableWorkers) {
console.log('[startup] federation workers disabled via DISABLE_FEDERATION_WORKERS');
} else {
startFederationWorkers();
}
const shutdown = async () => { const shutdown = async () => {
console.log('Shutting down...'); console.log('Shutting down...');