We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yatotm/tavily-mcp-loadbalancer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { AppDatabase } from '../data/database.js';
import { getRuntimeConfig } from '../utils/runtime-config.js';
import { daysAgoIso } from '../utils/date.js';
import { logger } from '../utils/logger.js';
export class LogCleanupScheduler {
private timer?: NodeJS.Timeout;
constructor(private db: AppDatabase) {}
start(intervalMs: number = 24 * 60 * 60 * 1000): void {
this.timer = setInterval(() => this.cleanup(), intervalMs);
this.cleanup();
}
cleanup(): void {
const runtime = getRuntimeConfig();
const cutoff = daysAgoIso(runtime.logRetentionDays);
const deleted = this.db.deleteOldLogs(cutoff);
if (deleted > 0) {
logger.info('Old logs removed', { deleted });
}
}
stop(): void {
if (this.timer) clearInterval(this.timer);
}
}