trails/apps/journal/app/lib/boss.server.ts
Ullrich Schäfer 5fd60ba07d WIP: Komoot import integration
Add Komoot API client, import logic, crypto helpers, integration routes,
DB schema changes, and i18n strings for the Komoot import feature.

Import processing runs as a durable pg-boss background job with retries
instead of blocking the HTTP request.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:10:00 +02:00

14 lines
334 B
TypeScript

import type { createBoss } from "@trails-cool/jobs";
type Boss = ReturnType<typeof createBoss>;
let boss: Boss | null = null;
export function setBoss(instance: Boss): void {
boss = instance;
}
export function getBoss(): Boss {
if (!boss) throw new Error("pg-boss not initialized — server still starting?");
return boss;
}