The UI goes live on the main domain directly, so the second-instance compose file and the AUTO_RULE_SYNC_DISABLED switch are not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
532 B
TypeScript
15 lines
532 B
TypeScript
export async function register(): Promise<void> {
|
|
// The album auto-rule sync is best-effort: a failure here must never take
|
|
// down request handling (a throwing register() makes Next.js answer every
|
|
// route with 500).
|
|
if (process.env.NEXT_RUNTIME !== "nodejs") {
|
|
return;
|
|
}
|
|
try {
|
|
const { startAutoRuleScheduler } = await import("@/modules/albums/auto-rule-scheduler");
|
|
startAutoRuleScheduler();
|
|
} catch (error) {
|
|
console.error("[auto-rule-sync] scheduler disabled after startup error:", error);
|
|
}
|
|
}
|