fix: remove unused imports and fix logger test isolation
- Remove unused imports (run, trackDuration, PerformanceTracker, ConfigManager, disconnectDb) flagged by ESLint - Remove unused isSlow variable in performance-monitor catch block - Add eslint-disable for require() in Playwright JS script - Fix logger-performance test flakiness by using vi.resetModules() with dynamic imports to prevent cached logger references across test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
import { create, type IDatabaseService } from './index'
|
||||
import { createDialect, type SqlDialect } from './dialects'
|
||||
import { createLogger, run, getRequestId, trackDuration } from '../logger'
|
||||
import { createLogger, getRequestId, trackDuration } from '../logger'
|
||||
import type {
|
||||
OperationHistoryRecord,
|
||||
BatchStats,
|
||||
@@ -202,7 +202,7 @@ export class ExtractorOperationHistoryDAO {
|
||||
`
|
||||
const params = [status, batchId]
|
||||
|
||||
const result = await trackDuration(async () => await dbService.query(sqlString, params), {
|
||||
await trackDuration(async () => await dbService.query(sqlString, params), {
|
||||
operationName: 'ExtractorOperationHistoryDAO.updateBatchStatus',
|
||||
context: { tableName, operationType: 'UPDATE', batchId }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user