mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-31 20:09:19 +08:00
etcd conf
This commit is contained in:
parent
4709e536ee
commit
7a5a308c9b
@ -139,12 +139,7 @@ func registerConf(key, conf string) {
|
|||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
//lease
|
//lease
|
||||||
ctx, _ := context.WithCancel(context.Background())
|
if _, err := cli.Put(context.Background(), key, conf); err != nil {
|
||||||
resp, err := cli.Grant(ctx, 10)
|
|
||||||
if err != nil {
|
|
||||||
panic(err.Error())
|
|
||||||
}
|
|
||||||
if _, err := cli.Put(ctx, key, conf, clientv3.WithLease(resp.ID)); err != nil {
|
|
||||||
fmt.Println("panic, params: ")
|
fmt.Println("panic, params: ")
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user