chore: drop parallel-run setup, document direct rollout and rollback

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>
This commit is contained in:
Leon TonhäuserandClaude Opus 5.5 committed 2026-11-30 18:30:44 +01:00
1 parent affa046b4a
commit c40ccf77cf
5 files changed
+21 -128

No files matched your search

-24
View File
@@ -1,24 +0,0 @@
import { afterEach, expect, test, vi } from "vitest";
const { startAutoRuleScheduler } = vi.hoisted(() => ({ startAutoRuleScheduler: vi.fn() }));
vi.mock("@/modules/albums/auto-rule-scheduler", () => ({ startAutoRuleScheduler }));
import { register } from "./instrumentation";
afterEach(() => {
vi.unstubAllEnvs();
startAutoRuleScheduler.mockClear();
});
test("starts the auto-rule sync on the node runtime", async () => {
vi.stubEnv("NEXT_RUNTIME", "nodejs");
await register();
expect(startAutoRuleScheduler).toHaveBeenCalledOnce();
});
test("AUTO_RULE_SYNC_DISABLED=true keeps a second instance from syncing", async () => {
vi.stubEnv("NEXT_RUNTIME", "nodejs");
vi.stubEnv("AUTO_RULE_SYNC_DISABLED", "true");
await register();
expect(startAutoRuleScheduler).not.toHaveBeenCalled();
});
-6
View File
@@ -5,12 +5,6 @@ export async function register(): Promise<void> {
if (process.env.NEXT_RUNTIME !== "nodejs") {
return;
}
// A second instance on the same DB (e.g. the parallel Sakani UI) must not
// run the sync a second time; the live instance keeps doing it.
if (process.env.AUTO_RULE_SYNC_DISABLED === "true") {
console.log("[auto-rule-sync] disabled via AUTO_RULE_SYNC_DISABLED");
return;
}
try {
const { startAutoRuleScheduler } = await import("@/modules/albums/auto-rule-scheduler");
startAutoRuleScheduler();