diff --git a/src/modules/words/words.module.ts b/src/modules/words/words.module.ts index 78c95fd..98e69ec 100644 --- a/src/modules/words/words.module.ts +++ b/src/modules/words/words.module.ts @@ -3,9 +3,10 @@ import { WordsController } from './words.controller'; import { WordsService } from './words.service'; import { PathModule } from '../../core/path/path.module'; import { ToolsModule } from '../../core/tools/tools.module'; +import { AutoUpdateModule } from '../../core/auto-update/auto-update.module'; @Module({ - imports: [PathModule, ToolsModule], + imports: [PathModule, ToolsModule, AutoUpdateModule], controllers: [WordsController], providers: [WordsService], exports: [WordsService], diff --git a/src/modules/words/words.service.ts b/src/modules/words/words.service.ts index 4ca9522..0d69959 100644 --- a/src/modules/words/words.service.ts +++ b/src/modules/words/words.service.ts @@ -35,9 +35,8 @@ export class WordsService { * 启动定时检查 words 仓库更新 */ private startAutoUpdate() { - const wordsPath = this.paths.get('words'); - setInterval(async () => { + const wordsPath = this.paths.get('words'); this.logger.log('定时检查文案仓库更新..'); const updated = await this.autoUpdateService.checkRepoForUpdates( wordsPath,