fixed all lint errors

This commit is contained in:
Boki 2025-06-23 18:14:43 -04:00
parent 519d24722e
commit 26d9b9ab3f
23 changed files with 63 additions and 43 deletions

View file

@ -49,7 +49,7 @@ const app = new ServiceApplication(
},
{
// Custom lifecycle hooks
onStarted: (port) => {
onStarted: (_port) => {
const logger = getLogger('web-api');
logger.info('Web API service startup initiated with ServiceApplication framework');
},

View file

@ -11,7 +11,6 @@ import type {
DatabaseStats,
SystemHealth,
ServiceMetrics,
MetricSnapshot,
ServiceStatus,
ProxyStats,
SystemOverview
@ -196,7 +195,7 @@ export class MonitoringService {
/**
* Get stats for a specific queue
*/
private async getQueueStatsForQueue(queue: any, queueName: string) {
private async getQueueStatsForQueue(queue: any, _queueName: string) {
// Check if it has the getStats method
if (queue.getStats && typeof queue.getStats === 'function') {
const stats = await queue.getStats();
@ -240,7 +239,7 @@ export class MonitoringService {
try {
const result = await queue[methodName]();
return Array.isArray(result) ? result.length : (result || 0);
} catch (e) {
} catch (_e) {
// Continue to next method
}
}
@ -260,7 +259,7 @@ export class MonitoringService {
if (queue.getPausedCount && typeof queue.getPausedCount === 'function') {
return await queue.getPausedCount();
}
} catch (e) {
} catch (_e) {
// Ignore
}
return 0;
@ -269,7 +268,7 @@ export class MonitoringService {
/**
* Get worker info for a queue
*/
private getWorkerInfo(queue: any, queueManager: any, queueName: string) {
private getWorkerInfo(queue: any, queueManager: any, _queueName: string) {
try {
// Check queue itself for worker info
if (queue.workers && Array.isArray(queue.workers)) {
@ -296,7 +295,7 @@ export class MonitoringService {
concurrency: 1,
};
}
} catch (e) {
} catch (_e) {
// Ignore
}
@ -313,7 +312,7 @@ export class MonitoringService {
if (this.container.postgres) {
try {
const startTime = Date.now();
const result = await this.container.postgres.query('SELECT 1');
const _result = await this.container.postgres.query('SELECT 1');
const latency = Date.now() - startTime;
// Get pool stats
@ -540,7 +539,7 @@ export class MonitoringService {
const response = await fetch(`http://localhost:${service.port}${service.path}`, {
signal: AbortSignal.timeout(5000), // 5 second timeout
});
const latency = Date.now() - startTime;
const _latency = Date.now() - startTime;
if (response.ok) {
const data = await response.json();
@ -704,13 +703,13 @@ export class MonitoringService {
const lines = meminfo.split('\n');
let memAvailable = 0;
let memTotal = 0;
let _memTotal = 0;
for (const line of lines) {
if (line.startsWith('MemAvailable:')) {
memAvailable = parseInt(line.split(/\s+/)[1], 10) * 1024; // Convert from KB to bytes
} else if (line.startsWith('MemTotal:')) {
memTotal = parseInt(line.split(/\s+/)[1], 10) * 1024;
_memTotal = parseInt(line.split(/\s+/)[1], 10) * 1024;
}
}