restore: 恢复 11-06~11-09 本地未提交改动
- libs: 新增 hr_sdk / hotel_report / dingtalk,更新 desktopauto - controlplane-next: SDK 管理模块(controller/entity/migrations)与前端视图 - electron-shell: 插件同步、注册表、runner 调整 - plugins: XQ0035/XQ0041/XQ0042/XQ0045_XQ0046/XQ0048/XQ0076/XQ0078 等版本更新 - tests/tools: 新增 SDK 兼容性检查与打包工具(sdk_pack.py、sdk_compat_check.py)
This commit is contained in:
@@ -22,7 +22,6 @@ import * as upload from '@midwayjs/upload';
|
||||
// import * as rpc from '@cool-midway/rpc';
|
||||
import { FileserverMonitorService } from './modules/center/service/fileserver-monitor';
|
||||
import { CenterLogService } from './modules/center/service/logstore';
|
||||
import { CenterRbacService } from './modules/center/service/rbac';
|
||||
|
||||
@Configuration({
|
||||
imports: [
|
||||
@@ -76,23 +75,6 @@ export class MainConfiguration {
|
||||
// 集中日志保留期清理(启动清理一次 + 周期清理,随进程启停)
|
||||
const logStore = await this.app.getApplicationContext().getAsync(CenterLogService);
|
||||
logStore.start();
|
||||
// 控制台 RBAC 幂等种子(initDB/initMenu=false,兜底超管角色、业务菜单、运行期账号)
|
||||
this.seedRbac();
|
||||
}
|
||||
|
||||
/** RBAC 种子:最多重试 3 次(等数据库连接就绪),失败仅记日志不阻断启动 */
|
||||
private seedRbac(attempt = 1) {
|
||||
this.app
|
||||
.getApplicationContext()
|
||||
.getAsync(CenterRbacService)
|
||||
.then(rbac => rbac.ensureSeed())
|
||||
.catch(e => {
|
||||
if (attempt < 3) {
|
||||
setTimeout(() => this.seedRbac(attempt + 1), 3000);
|
||||
return;
|
||||
}
|
||||
this.logger.error('[rbac] 控制台权限种子初始化失败:%s', (e as Error)?.message || e);
|
||||
});
|
||||
}
|
||||
|
||||
async onStop() {
|
||||
|
||||
Reference in New Issue
Block a user