fix(GOV-009): 完成脚手架审查整改
This commit is contained in:
@@ -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],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user