perf与性能优化

This commit is contained in:
flswld
2023-04-15 20:00:37 +08:00
parent 149b773f4b
commit 094ad5add0
26 changed files with 403 additions and 308 deletions

View File

@@ -27,12 +27,12 @@ func Run(ctx context.Context, configFile string) error {
defer db.CloseDao()
// natsrpc client
client, err := rpc.NewClient()
discoveryClient, err := rpc.NewDiscoveryClient()
if err != nil {
return err
}
_ = controller.NewController(db, client.Discovery)
_ = controller.NewController(db, discoveryClient)
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)