refactor: remove scheduled cron sync, manual trigger only

This commit is contained in:
2026-07-09 10:24:12 +08:00
parent e8dec3b171
commit 731f74e51a
4 changed files with 362 additions and 14 deletions

View File

@@ -1,21 +1,36 @@
import { Module } from '@nestjs/common';
import { ScheduleModule } from '@nestjs/schedule';
import { TypeOrmModule } from '@nestjs/typeorm';
import { IntegrationModule } from '../integration/integration.module';
import { AttendanceModule } from '../attendance/attendance.module';
import { SyncLog, SyncState, UserDingMapping } from '../entities';
import {
SyncLog,
SyncState,
UserDingMapping,
ClassSchedule,
Department,
UserDepartment,
ClassTeacher,
} from '../entities';
import { SyncService } from './sync.service';
import { SyncController } from './sync.controller';
import { ScheduleSyncService } from './schedule-sync.service';
@Module({
imports: [
ScheduleModule.forRoot(),
TypeOrmModule.forFeature([SyncLog, SyncState, UserDingMapping]),
TypeOrmModule.forFeature([
SyncLog,
SyncState,
UserDingMapping,
ClassSchedule,
Department,
UserDepartment,
ClassTeacher,
]),
IntegrationModule,
AttendanceModule,
],
controllers: [SyncController],
providers: [SyncService],
providers: [SyncService, ScheduleSyncService],
exports: [SyncService],
})
export class SyncModule {}