refactor: Fix linter errors by auto-apply

- Apply automated linter fixes
- Manually reformat fields in model/service.go
- Resolve code complexity issues
This commit is contained in:
2025-11-04 19:59:17 +03:00
parent 180a5c2a90
commit fc8b723114
11 changed files with 60 additions and 32 deletions

View File

@@ -18,6 +18,7 @@ func Run(serverArgs *args.ServerCmd) {
connect, err := db.Connect()
if err != nil {
appLog.Global.Get(appLog.SYSTEM).Error(fmt.Sprintf("Startup server error, failed connect to database: %v", err))
return
}
@@ -26,6 +27,7 @@ func Run(serverArgs *args.ServerCmd) {
scheduler.GlobalAppScheduler, err = scheduler.NewAppScheduler()
if err != nil {
appLog.Global.Get(appLog.SYSTEM).Error(fmt.Sprintf("Startup server error, failed create scheduler: %v", err))
return
}
@@ -34,11 +36,13 @@ func Run(serverArgs *args.ServerCmd) {
if err = service.GlobalCheckService.RegisterTasks(context.Background()); err != nil {
appLog.Global.Get(appLog.SYSTEM).Error(fmt.Sprintf("Startup server error, failed create observe jobs: %v", err))
return
}
if err = scheduler.GlobalAppScheduler.StartJobs(); err != nil {
appLog.Global.Get(appLog.SYSTEM).Error(fmt.Sprintf("Startup server error, failed start jobs: %v", err))
return
}