mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 22:02:08 +03:00
chore: remove unused provider limits scheduler export (#5354)
Integrated into release/v3.8.41 — dead-code removal (typecheck:core EXIT 0, 102 affected tests green, fabricated-docs clean). Thanks @JxnLexn.
This commit is contained in:
@@ -70,16 +70,3 @@ export function startProviderLimitsSyncScheduler(): void {
|
||||
startupTimer.unref?.();
|
||||
})();
|
||||
}
|
||||
|
||||
export function stopProviderLimitsSyncScheduler(): void {
|
||||
if (startupTimer) {
|
||||
clearTimeout(startupTimer);
|
||||
startupTimer = null;
|
||||
}
|
||||
|
||||
if (schedulerTimer) {
|
||||
clearInterval(schedulerTimer);
|
||||
schedulerTimer = null;
|
||||
console.log("[ProviderLimitsSync] Scheduler stopped");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-provider-limits-sync-"));
|
||||
process.env.DATA_DIR = TEST_DATA_DIR;
|
||||
process.env.NODE_ENV = "test";
|
||||
process.env.DISABLE_SQLITE_AUTO_BACKUP = "true";
|
||||
|
||||
const schedulerModule = await import("../../src/shared/services/providerLimitsSyncScheduler.ts");
|
||||
const core = await import("../../src/lib/db/core.ts");
|
||||
|
||||
test.after(() => {
|
||||
core.resetDbInstance();
|
||||
fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
test("provider limits sync scheduler public surface excludes unused stop helper", () => {
|
||||
assert.equal("startProviderLimitsSyncScheduler" in schedulerModule, true);
|
||||
assert.equal("stopProviderLimitsSyncScheduler" in schedulerModule, false);
|
||||
});
|
||||
Reference in New Issue
Block a user