Merge branch 'main' of http://100.64.131.105:3000/GY/smart_grid_iot
This commit is contained in:
commit
184b8d03e2
21 files changed
+1363
-6
No files matched your search
@@ -8,6 +8,7 @@ import SysJob from "../entity/sys_job.entity";
|
||||
import SysJobLog from "../entity/sys_job_log.entity";
|
||||
import { LogService } from "./log.service";
|
||||
import { NoticeRuleService } from "./notice_rule.service";
|
||||
import { IccLineSyncService } from "./icc_line_sync.service";
|
||||
import { BuiltinJob, JobHandlerContext, JobRuntime, getBuiltinJob } from "../task/job_registry";
|
||||
|
||||
/** 任务执行结果(一次尝试) */
|
||||
@@ -445,6 +446,12 @@ export class JobSchedulerService {
|
||||
const ctx = this.app.createAnonymousContext();
|
||||
const noticeRuleService = (await ctx.requestContext.getAsync(NoticeRuleService)) as NoticeRuleService;
|
||||
return noticeRuleService.executeScan();
|
||||
},
|
||||
syncIccLines: async () => {
|
||||
const ctx = this.app.createAnonymousContext();
|
||||
const iccService = (await ctx.requestContext.getAsync(IccLineSyncService)) as IccLineSyncService;
|
||||
const result = await iccService.syncFromIcc();
|
||||
return `拉取 ${result.pulled} 条,新增 ${result.inserted},更新 ${result.updated},跳过 ${result.skipped}`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user