updates
This commit is contained in:
parent
d3ef73ae00
commit
a2fa08de88
8 changed files with 72 additions and 68 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import { getLogger } from '@stock-bot/logger';
|
||||
import { QueueRateLimiter } from './rate-limiter';
|
||||
import { Queue, type QueueConfig } from './queue';
|
||||
import { Queue, type QueueWorkerConfig } from './queue';
|
||||
import { CacheProvider, createCache } from '@stock-bot/cache';
|
||||
import type {
|
||||
QueueManagerConfig,
|
||||
QueueOptions,
|
||||
GlobalStats,
|
||||
QueueStats,
|
||||
RateLimitRule
|
||||
RateLimitRule,
|
||||
RedisConfig
|
||||
} from './types';
|
||||
import { getRedisConnection } from './utils';
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ export class QueueManager {
|
|||
private queues = new Map<string, Queue>();
|
||||
private caches = new Map<string, CacheProvider>();
|
||||
private rateLimiter?: QueueRateLimiter;
|
||||
private redisConnection: any;
|
||||
private redisConnection: ReturnType<typeof getRedisConnection>;
|
||||
private isShuttingDown = false;
|
||||
private isInitialized = false;
|
||||
|
||||
|
|
@ -93,7 +94,7 @@ export class QueueManager {
|
|||
};
|
||||
|
||||
// Prepare queue configuration
|
||||
const queueConfig: QueueConfig = {
|
||||
const queueConfig: QueueWorkerConfig = {
|
||||
workers: mergedOptions.workers,
|
||||
concurrency: mergedOptions.concurrency,
|
||||
startWorker: mergedOptions.workers && mergedOptions.workers > 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue