@@ -3,7 +3,7 @@ import { Counter } from '@opentelemetry/api';
33//import { Meter } from '@opentelemetry/sdk-metrics-base';
44import { ConnectionOptions , Job as BullJob , JobsOptions , Queue , RedisClient } from 'bullmq' ;
55import { ConfigService } from '../configs/config.service' ;
6- import { LogService } from '../log/log .service' ;
6+ import { LoggerService } from '../logger/logger .service' ;
77import { TraceService } from '../trace/trace.service' ;
88import { JobNames } from './models/job-names.enum' ;
99import { QueueNames } from './models/queue-names.enum' ;
@@ -20,7 +20,7 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
2020
2121 constructor (
2222 private readonly configService : ConfigService ,
23- private readonly logService : LogService ,
23+ private readonly logger : LoggerService ,
2424 private readonly traceService : TraceService //private readonly meter: Meter,
2525 ) {
2626 /*this.queuedJobsCounter = this.meter.createCounter(
@@ -74,7 +74,7 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
7474 } )
7575 ) ;
7676
77- this . logService . info ( 'Connected to Redis' ) ;
77+ this . logger . info ( 'Connected to Redis' ) ;
7878 } catch ( error ) {
7979 this . onConnectionError ( error ) ;
8080 }
@@ -95,7 +95,7 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
9595 await this . bullQueues [ queue ] . disconnect ( ) ;
9696 }
9797
98- this . logService . debug ( 'Disconnected from Redis instance' ) ;
98+ this . logger . debug ( 'Disconnected from Redis instance' ) ;
9999 }
100100
101101 /**
@@ -106,7 +106,7 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
106106 * @memberof QueueService
107107 */
108108 private onConnectionError ( error : Error ) : void {
109- this . logService . error ( 'Connection error' , {
109+ this . logger . error ( 'Connection error' , {
110110 errorMessage : error . message ,
111111 errorStack : error . stack ,
112112 } ) ;
@@ -124,7 +124,7 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
124124 } ) ;
125125
126126 span . setAttributes ( { id : job . id , name : job . name } ) ;
127- this . logService . info ( 'Queued job' , { id : job . id , name : job . name } ) ;
127+ this . logger . info ( 'Queued job' , { id : job . id , name : job . name } ) ;
128128 span . end ( ) ;
129129
130130 return job ;
@@ -154,7 +154,7 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
154154 const jobs = await this . bullQueues [ queueName ] . addBulk ( jobsPayload ) ;
155155
156156 const logJobs = jobs . map ( ( job ) => ( { id : job . id , name : job . name } ) ) ;
157- this . logService . info ( 'Queued jobs' , {
157+ this . logger . info ( 'Queued jobs' , {
158158 jobs : logJobs . length ,
159159 jobsSamples : JSON . stringify ( logJobs . slice ( 0 , 100 ) ) ,
160160 } ) ;
0 commit comments