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>
14 lines
334 B
TypeScript
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;
|
|
}
|