chore(): cleanup debug code

This commit is contained in:
Alexander Bukhalo 2021-01-02 01:32:49 +03:00
parent 841ba6e6a0
commit 3d7ecbd7f2
2 changed files with 2 additions and 10 deletions

View File

@ -1,4 +1,4 @@
import { Inject, Injectable, Logger, OnModuleInit } from '@nestjs/common'; import { Inject, Injectable, OnModuleInit } from '@nestjs/common';
import { DiscoveryService, ModuleRef, ModulesContainer } from '@nestjs/core'; import { DiscoveryService, ModuleRef, ModulesContainer } from '@nestjs/core';
import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper'; import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';
import { MetadataScanner } from '@nestjs/core/metadata-scanner'; import { MetadataScanner } from '@nestjs/core/metadata-scanner';
@ -29,8 +29,6 @@ import { Module } from '@nestjs/core/injector/module';
export class UpdatesExplorerService export class UpdatesExplorerService
extends BaseExplorerService extends BaseExplorerService
implements OnModuleInit { implements OnModuleInit {
private readonly logger = new Logger(UpdatesExplorerService.name);
constructor( constructor(
@Inject(TELEGRAF_BOT_NAME) @Inject(TELEGRAF_BOT_NAME)
private readonly botName: string, private readonly botName: string,
@ -48,7 +46,6 @@ export class UpdatesExplorerService
private bot: Telegraf<any>; private bot: Telegraf<any>;
onModuleInit(): void { onModuleInit(): void {
this.logger.debug(this.botName);
this.bot = this.moduleRef.get<Telegraf<any>>(this.botName, { this.bot = this.moduleRef.get<Telegraf<any>>(this.botName, {
strict: false, strict: false,
}); });

View File

@ -7,7 +7,6 @@ import {
Global, Global,
Inject, Inject,
OnApplicationShutdown, OnApplicationShutdown,
Logger,
} from '@nestjs/common'; } from '@nestjs/common';
import { import {
TelegrafModuleOptions, TelegrafModuleOptions,
@ -29,14 +28,10 @@ import { defer } from 'rxjs';
providers: [UpdatesExplorerService, MetadataAccessorService], providers: [UpdatesExplorerService, MetadataAccessorService],
}) })
export class TelegrafCoreModule implements OnApplicationShutdown { export class TelegrafCoreModule implements OnApplicationShutdown {
private readonly logger = new Logger(TelegrafCoreModule.name);
constructor( constructor(
@Inject(TELEGRAF_BOT_NAME) private readonly botName: string, @Inject(TELEGRAF_BOT_NAME) private readonly botName: string,
private readonly moduleRef: ModuleRef, private readonly moduleRef: ModuleRef,
) { ) {}
this.logger.debug(botName);
}
public static forRoot(options: TelegrafModuleOptions): DynamicModule { public static forRoot(options: TelegrafModuleOptions): DynamicModule {
const telegrafBotName = getBotToken(options.botName); const telegrafBotName = getBotToken(options.botName);