feat(federation): add outbox delivery, file queue download, and health check workers

This commit is contained in:
Jannis Braun
2026-03-25 21:39:32 +01:00
parent 7f20a4517c
commit 3898e4940a
2 changed files with 607 additions and 0 deletions
+5
View File
@@ -26,6 +26,7 @@ import { searchRoutes } from './routes/search.js';
import { adminRoutes } from './routes/admin.js';
import { gifRoutes } from './routes/gif.js';
import { federationRoutes } from './routes/federation.js';
import { startFederationWorkers, stopFederationWorkers } from './utils/federationWorker.js';
import { registerWebSocket } from './ws/handler.js';
import path from 'path';
@@ -134,8 +135,12 @@ async function main(): Promise<void> {
console.error('Media dimensions backfill failed (non-fatal):', err);
});
// Start federation background workers (outbox delivery, file download, health check)
startFederationWorkers();
const shutdown = async () => {
console.log('Shutting down...');
stopFederationWorkers();
await app.close();
process.exit(0);
};