fix(GOV-009): 完成脚手架审查整改

This commit is contained in:
2026-08-13 18:30:57 +08:00
parent dcdf634457
commit 3a8120a33a
47 changed files with 752 additions and 101 deletions
+16 -2
View File
@@ -1,4 +1,18 @@
import { Module } from '@nestjs/common';
import { type DynamicModule, Module } from '@nestjs/common';
import type { SchedulerRuntimeConfig } from '../../../libs/config/src/runtime-config';
/** Scheduler 的最小权限配置令牌,不向 API 或 Worker 暴露其任务调度配置。 */
export const SCHEDULER_RUNTIME_CONFIG = Symbol('SCHEDULER_RUNTIME_CONFIG');
@Module({})
export class SchedulerModule {}
export class SchedulerModule {
/** 将入口校验后的 Scheduler 配置注册进当前进程容器。 */
static register(config: SchedulerRuntimeConfig): DynamicModule {
return {
module: SchedulerModule,
providers: [{ provide: SCHEDULER_RUNTIME_CONFIG, useValue: config }],
exports: [SCHEDULER_RUNTIME_CONFIG],
};
}
}