optimization: change the configuration file from being read globally to being read independently.

This commit is contained in:
Gordon 2024-02-20 22:17:50 +08:00
parent 5f2f56bcaf
commit d0b16a6c16

View File

@ -28,6 +28,7 @@ type CronTaskCmd struct {
func NewCronTaskCmd() *CronTaskCmd { func NewCronTaskCmd() *CronTaskCmd {
ret := &CronTaskCmd{RootCmd: NewRootCmd("cronTask", WithCronTaskLogName()), ret := &CronTaskCmd{RootCmd: NewRootCmd("cronTask", WithCronTaskLogName()),
initFunc: tools.StartTask} initFunc: tools.StartTask}
ret.addRunE()
ret.SetRootCmdPt(ret) ret.SetRootCmdPt(ret)
return ret return ret
} }