|
|
@@ -6,6 +6,7 @@ import cn.reghao.devops.manager.account.service.FileService;
|
|
|
import cn.reghao.devops.manager.account.service.RoleService;
|
|
|
import cn.reghao.devops.manager.app.db.repository.config.build.CompilerConfigRepository;
|
|
|
import cn.reghao.devops.manager.app.model.po.config.build.CompilerConfig;
|
|
|
+import cn.reghao.devops.manager.app.service.bd.BuildStat;
|
|
|
import cn.reghao.devops.manager.app.service.config.BuildDirService;
|
|
|
import cn.reghao.devops.manager.log.Appenders;
|
|
|
import cn.reghao.devops.manager.log.LoggerConfig;
|
|
|
@@ -38,10 +39,12 @@ public class AppLifecycle implements ApplicationRunner, DisposableBean {
|
|
|
private final RoleService roleService;
|
|
|
private final AccountService accountService;
|
|
|
private final SysMessageRepository sysMessageRepository;
|
|
|
+ private BuildStat buildStat;
|
|
|
|
|
|
public AppLifecycle(BuildDirService buildDirService, MachineService machineService, LogHandler logHandler,
|
|
|
CompilerConfigRepository compilerConfigRepository, FileService fileService,
|
|
|
- RoleService roleService, AccountService accountService, SysMessageRepository sysMessageRepository) {
|
|
|
+ RoleService roleService, AccountService accountService, SysMessageRepository sysMessageRepository,
|
|
|
+ BuildStat buildStat) {
|
|
|
this.buildDirService = buildDirService;
|
|
|
this.machineService = machineService;
|
|
|
this.logHandler = logHandler;
|
|
|
@@ -50,11 +53,13 @@ public class AppLifecycle implements ApplicationRunner, DisposableBean {
|
|
|
this.roleService = roleService;
|
|
|
this.accountService = accountService;
|
|
|
this.sysMessageRepository = sysMessageRepository;
|
|
|
+ this.buildStat = buildStat;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void run(ApplicationArguments args) throws IOException {
|
|
|
initSys();
|
|
|
+ buildStat.resetState();
|
|
|
log.info("devops-manager started");
|
|
|
}
|
|
|
|