chore(cleanup): prune dead code after refactors

This commit is contained in:
2026-02-21 20:04:57 -08:00
parent 704e664cc3
commit ace809b575
14 changed files with 109 additions and 85 deletions

View File

@@ -5,7 +5,6 @@ import * as os from 'os';
import { createLogger } from '../../logger';
import {
JimakuApiResponse,
JimakuDownloadQuery,
JimakuDownloadResult,
JimakuEntry,
JimakuFileEntry,

View File

@@ -90,13 +90,11 @@ export class ImmersionTrackerService {
private maintenanceTimer: ReturnType<typeof setInterval> | null = null;
private flushScheduled = false;
private droppedWriteCount = 0;
private lastMaintenanceMs = 0;
private lastVacuumMs = 0;
private isDestroyed = false;
private sessionState: SessionState | null = null;
private currentVideoKey = '';
private currentMediaPathOrUrl = '';
private lastQueueWriteAtMs = 0;
private readonly telemetryInsertStmt: ReturnType<DatabaseSync['prepare']>;
private readonly eventInsertStmt: ReturnType<DatabaseSync['prepare']>;
@@ -165,8 +163,6 @@ export class ImmersionTrackerService {
1,
3650,
) * 86_400_000;
this.lastMaintenanceMs = Date.now();
this.db = new DatabaseSync(this.dbPath);
this.applyPragmas();
this.ensureSchema();
@@ -493,7 +489,6 @@ export class ImmersionTrackerService {
this.droppedWriteCount += dropped;
this.logger.warn(`Immersion tracker queue overflow; dropped ${dropped} oldest writes`);
}
this.lastQueueWriteAtMs = Date.now();
if (write.kind === 'event' || this.queue.length >= this.batchSize) {
this.scheduleFlush(0);
}
@@ -782,7 +777,6 @@ export class ImmersionTrackerService {
this.db.exec('VACUUM');
this.lastVacuumMs = nowMs;
}
this.lastMaintenanceMs = nowMs;
} catch (error) {
this.logger.warn(
'Immersion tracker maintenance failed, will retry later',
@@ -791,10 +785,6 @@ export class ImmersionTrackerService {
}
}
private runRollupMaintenance(): void {
runRollupMaintenance(this.db);
}
private startSession(videoId: number, startedAtMs?: number): void {
const nowMs = startedAtMs ?? Date.now();
const result = this.startSessionStatement(videoId, nowMs);

View File

@@ -1,7 +1,6 @@
import {
RuntimeOptionApplyResult,
RuntimeOptionId,
RuntimeOptionValue,
SubsyncManualRunRequest,
SubsyncResult,
} from '../../types';

View File

@@ -1,6 +1,5 @@
export { generateDefaultConfigFile } from './config-gen';
export { enforceUnsupportedWaylandMode, forceX11Backend } from './electron-backend';
export { asBoolean, asFiniteNumber, asString } from './coerce';
export { resolveKeybindings } from './keybindings';
export { resolveConfiguredShortcuts } from './shortcut-config';
export { showDesktopNotification } from './notification';