mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 10:05:58 +08:00
test cobra
This commit is contained in:
@@ -2,17 +2,16 @@ package main
|
||||
|
||||
import (
|
||||
"OpenIM/internal/tools"
|
||||
"OpenIM/pkg/common/config"
|
||||
"OpenIM/pkg/common/cmd"
|
||||
"fmt"
|
||||
"time"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(time.Now(), "start cronTask")
|
||||
if err := config.InitConfig(""); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
if err := tools.StartCronTask(); err != nil {
|
||||
panic(err.Error())
|
||||
cronTaskCmd := cmd.NewCronTaskCmd()
|
||||
cronTaskCmd.AddRunE(tools.StartCronTask)
|
||||
if err := cronTaskCmd.Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user