code refactor

This commit is contained in:
MaysWind
2025-07-06 15:50:53 +08:00
parent a54275d307
commit 82b98eca95
9 changed files with 239 additions and 191 deletions
+8
View File
@@ -19,6 +19,7 @@ import (
"github.com/mayswind/ezbookkeeping/pkg/cron"
"github.com/mayswind/ezbookkeeping/pkg/errs"
"github.com/mayswind/ezbookkeeping/pkg/log"
"github.com/mayswind/ezbookkeeping/pkg/mcp"
"github.com/mayswind/ezbookkeeping/pkg/middlewares"
"github.com/mayswind/ezbookkeeping/pkg/requestid"
"github.com/mayswind/ezbookkeeping/pkg/settings"
@@ -64,6 +65,13 @@ func startWebServer(c *core.CliContext) error {
return err
}
err = mcp.InitializeMCPHandlers(config)
if err != nil {
log.BootErrorf(c, "[webserver.startWebServer] initializes mcp handlers failed, because %s", err.Error())
return err
}
err = cron.InitializeCronJobSchedulerContainer(c, config, true)
if err != nil {