Skip to content

Commit

Permalink
fix: Correct the retry logging by binding context using arrow functio…
Browse files Browse the repository at this point in the history
…ns (#1465)
  • Loading branch information
praju-aot authored Jul 9, 2024
1 parent 7942245 commit 3c4a81d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dops/src/modules/common/common.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import axiosRetry from 'axios-retry';

@Injectable()
export class CommonService {
private readonly logger = new Logger(CommonService.name);
public readonly logger = new Logger(CommonService.name);
constructor(private readonly httpService: HttpService) {
// Configure axios-retry here
axiosRetry(this.httpService.axiosRef, {
Expand All @@ -25,7 +25,7 @@ export class CommonService {
error.response?.status >= 500
);
},
onRetry(retryCount, error, requestConfig) {
onRetry: (retryCount, error, requestConfig) => {
/* eslint-disable */
this.logger.error(
`URL: ${requestConfig?.baseURL}, error status: ${error?.status}, Retry Count: ${retryCount}`,
Expand Down
1 change: 0 additions & 1 deletion scheduler/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { addToCache, createCacheMap } from './common/helper/cache.helper';
@Injectable()
export class AppService {
private readonly logger = new Logger(AppService.name);

constructor(
@Inject(CACHE_MANAGER)
private readonly cacheManager: Cache,
Expand Down

0 comments on commit 3c4a81d

Please sign in to comment.