removed singletop pattern from queue manager

This commit is contained in:
Boki 2025-06-22 19:16:25 -04:00
parent eeb5d1aca2
commit db3aa9c330
12 changed files with 504 additions and 380 deletions

View file

@ -35,6 +35,10 @@ export function initializeProxyProvider(_container: ServiceContainer) {
return { processed: 0, successful: 0 };
}
// Get QueueManager instance - we have to use getInstance for now until handlers get container access
const { QueueManager } = await import('@stock-bot/queue');
const queueManager = QueueManager.getInstance();
// Batch process the proxies through check-proxy operation
const batchResult = await processItems(proxies, 'proxy', {
handler: 'proxy',
@ -47,7 +51,7 @@ export function initializeProxyProvider(_container: ServiceContainer) {
ttl: 30000, // 30 second timeout per proxy check
removeOnComplete: 5,
removeOnFail: 3,
});
}, queueManager);
handlerLogger.info('Batch proxy validation completed', {
totalProxies: proxies.length,