feat: add announcement channels, publishing and following (#3090)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-01 16:57:21 +02:00
1 parent 376afd2ad6
commit 7e4d5137f8
381 files changed
+45650 -14076

No files matched your search

+1 -1
View File
@@ -405,7 +405,7 @@ function validateApiWorkerConfig(config: MasterConfig): void {
assertOneOf(worker.mode, ['all_lanes', 'single_lane', 'single_task'], 'FLUXER_API_WORKER_MODE');
}
if (worker.lane !== undefined) {
assertOneOf(worker.lane, ['realtime', 'unfurl', 'lifecycle', 'batch'], 'FLUXER_API_WORKER_LANE');
assertOneOf(worker.lane, ['realtime', 'unfurl', 'lifecycle', 'batch', 'crosspost'], 'FLUXER_API_WORKER_LANE');
}
if (worker.mode === 'single_task') {
requireString(worker.task, 'FLUXER_API_WORKER_TASK');
+2 -1
View File
@@ -92,7 +92,7 @@ export interface MasterConfig {
app_origin_aliases: Array<string>;
worker?: {
mode?: 'all_lanes' | 'single_lane' | 'single_task';
lane?: 'realtime' | 'unfurl' | 'lifecycle' | 'batch';
lane?: 'realtime' | 'unfurl' | 'lifecycle' | 'batch' | 'crosspost';
task?: string;
enable_cron_scheduler?: boolean;
lane_concurrency_overrides?: {
@@ -100,6 +100,7 @@ export interface MasterConfig {
unfurl?: number;
lifecycle?: number;
batch?: number;
crosspost?: number;
};
};
storage_change_feed?: {
@@ -343,6 +343,22 @@ describe('ConfigLoader', () => {
expect(config.services.gateway).not.toHaveProperty('push_enabled');
});
test('accepts the crosspost worker lane', async () => {
stubMinimalEnv({
FLUXER_API_WORKER_MODE: 'single_lane',
FLUXER_API_WORKER_LANE: 'crosspost',
FLUXER_API_WORKER_LANE_CONCURRENCY_OVERRIDES: '{"crosspost":4}',
});
const config = await loadConfig();
expect(config.services.api.worker?.lane).toBe('crosspost');
expect(config.services.api.worker?.lane_concurrency_overrides?.crosspost).toBe(4);
});
test('rejects an unknown worker lane', async () => {
stubMinimalEnv({FLUXER_API_WORKER_MODE: 'single_lane', FLUXER_API_WORKER_LANE: 'publishing'});
await expect(loadConfig()).rejects.toThrow('FLUXER_API_WORKER_LANE');
});
test('rejects single task worker mode without task env', async () => {
stubMinimalEnv({FLUXER_API_WORKER_MODE: 'single_task'});
await expect(loadConfig()).rejects.toThrow('FLUXER_API_WORKER_TASK');