lint issues
This commit is contained in:
parent
19dfda2392
commit
190b725149
7 changed files with 71 additions and 28 deletions
|
|
@ -2,17 +2,25 @@ import { Queue, type Job } from 'bullmq';
|
|||
import type { DLQConfig, RedisConfig } from './types';
|
||||
import { getRedisConnection } from './utils';
|
||||
|
||||
// Logger interface for type safety
|
||||
interface Logger {
|
||||
info(message: string, meta?: Record<string, unknown>): void;
|
||||
error(message: string, meta?: Record<string, unknown>): void;
|
||||
warn(message: string, meta?: Record<string, unknown>): void;
|
||||
debug(message: string, meta?: Record<string, unknown>): void;
|
||||
}
|
||||
|
||||
export class DeadLetterQueueHandler {
|
||||
private dlq: Queue;
|
||||
private config: Required<DLQConfig>;
|
||||
private failureCount = new Map<string, number>();
|
||||
private readonly logger: any;
|
||||
private readonly logger: Logger;
|
||||
|
||||
constructor(
|
||||
private mainQueue: Queue,
|
||||
connection: RedisConfig,
|
||||
config: DLQConfig = {},
|
||||
logger?: any
|
||||
logger?: Logger
|
||||
) {
|
||||
this.logger = logger || console;
|
||||
this.config = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue