mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-12-05 18:41:56 +00:00
文案模块优化
This commit is contained in:
parent
de264b1244
commit
839df5170a
@ -3,9 +3,10 @@ import { WordsController } from './words.controller';
|
|||||||
import { WordsService } from './words.service';
|
import { WordsService } from './words.service';
|
||||||
import { PathModule } from '../../core/path/path.module';
|
import { PathModule } from '../../core/path/path.module';
|
||||||
import { ToolsModule } from '../../core/tools/tools.module';
|
import { ToolsModule } from '../../core/tools/tools.module';
|
||||||
|
import { AutoUpdateModule } from '../../core/auto-update/auto-update.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [PathModule, ToolsModule],
|
imports: [PathModule, ToolsModule, AutoUpdateModule],
|
||||||
controllers: [WordsController],
|
controllers: [WordsController],
|
||||||
providers: [WordsService],
|
providers: [WordsService],
|
||||||
exports: [WordsService],
|
exports: [WordsService],
|
||||||
|
|||||||
@ -35,9 +35,8 @@ export class WordsService {
|
|||||||
* 启动定时检查 words 仓库更新
|
* 启动定时检查 words 仓库更新
|
||||||
*/
|
*/
|
||||||
private startAutoUpdate() {
|
private startAutoUpdate() {
|
||||||
const wordsPath = this.paths.get('words');
|
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
|
const wordsPath = this.paths.get('words');
|
||||||
this.logger.log('定时检查文案仓库更新..');
|
this.logger.log('定时检查文案仓库更新..');
|
||||||
const updated = await this.autoUpdateService.checkRepoForUpdates(
|
const updated = await this.autoUpdateService.checkRepoForUpdates(
|
||||||
wordsPath,
|
wordsPath,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user