mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
chore(cleanup): prune dead code after refactors
This commit is contained in:
@@ -5,7 +5,6 @@ import * as os from 'os';
|
||||
import { createLogger } from '../../logger';
|
||||
import {
|
||||
JimakuApiResponse,
|
||||
JimakuDownloadQuery,
|
||||
JimakuDownloadResult,
|
||||
JimakuEntry,
|
||||
JimakuFileEntry,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
RuntimeOptionApplyResult,
|
||||
RuntimeOptionId,
|
||||
RuntimeOptionValue,
|
||||
SubsyncManualRunRequest,
|
||||
SubsyncResult,
|
||||
} from '../../types';
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user