reworked queue lib
This commit is contained in:
parent
629ba2b8d4
commit
c05a7413dc
34 changed files with 3887 additions and 861 deletions
|
|
@ -5,7 +5,7 @@ import type { ProcessOptions, BatchResult } from './types';
|
|||
|
||||
const logger = getLogger('queue-factory');
|
||||
|
||||
// Global queue manager (manages workers and providers)
|
||||
// Global queue manager (manages workers and handlers)
|
||||
let queueManager: QueueManager | null = null;
|
||||
// Registry of individual queues
|
||||
const queues = new Map<string, Queue>();
|
||||
|
|
@ -31,7 +31,7 @@ export async function initializeQueueSystem(config: {
|
|||
workers: config.workers || 5,
|
||||
concurrency: config.concurrency || 20,
|
||||
defaultJobOptions: config.defaultJobOptions,
|
||||
providers: [], // Will be set by individual services
|
||||
handlers: [], // Will be set by individual services
|
||||
});
|
||||
|
||||
await queueManager.initialize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue