upgrade github.com/alimy/tryst => v0.9.4

pull/415/head
Michael Li 1 year ago
parent dd7eabec28
commit 98ec6fea2c
No known key found for this signature in database

@ -7,7 +7,7 @@ require (
github.com/RoaringBitmap/roaring v1.6.0 github.com/RoaringBitmap/roaring v1.6.0
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868
github.com/alimy/mir/v4 v4.0.0 github.com/alimy/mir/v4 v4.0.0
github.com/alimy/tryst v0.9.3 github.com/alimy/tryst v0.9.4
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible
github.com/allegro/bigcache/v3 v3.1.0 github.com/allegro/bigcache/v3 v3.1.0
github.com/bufbuild/connect-go v1.10.0 github.com/bufbuild/connect-go v1.10.0

@ -127,8 +127,8 @@ github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:C
github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg= github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc= github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/tryst v0.9.3 h1:R5HtBZoimiCszvsnBxhig8W75Rzi2NoEH7qaJ3nwhW8= github.com/alimy/tryst v0.9.4 h1:faM0BwgcU7mxdEF2lG8c45iXXkEPEYvBd0oLBrNa1yM=
github.com/alimy/tryst v0.9.3/go.mod h1:6FcqEImav7S62em+p+MODh+stt/UPp23HobUOK3XwFY= github.com/alimy/tryst v0.9.4/go.mod h1:6FcqEImav7S62em+p+MODh+stt/UPp23HobUOK3XwFY=
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible h1:Sg/2xHwDrioHpxTN6WMiwbXTpUEinBpHsN7mG21Rc2k= github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible h1:Sg/2xHwDrioHpxTN6WMiwbXTpUEinBpHsN7mG21Rc2k=
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk=

@ -22,6 +22,7 @@ Cache:
MessagesExpire: 60 # 消息列表过期时间,单位秒, 默认60s MessagesExpire: 60 # 消息列表过期时间,单位秒, 默认60s
EventManager: # 事件管理器的配置参数 EventManager: # 事件管理器的配置参数
MinWorker: 64 # 最小后台工作者, 设置范围[5, ++], 默认64 MinWorker: 64 # 最小后台工作者, 设置范围[5, ++], 默认64
MaxTempWorker: -1 # 最大临时工作者, -1为无限制, 默认-1
MaxEventBuf: 128 # 最大log缓存条数, 设置范围[10, ++], 默认128 MaxEventBuf: 128 # 最大log缓存条数, 设置范围[10, ++], 默认128
MaxTempEventBuf: 256 # 最大log缓存条数, 设置范围[10, ++], 默认256 MaxTempEventBuf: 256 # 最大log缓存条数, 设置范围[10, ++], 默认256
MaxTickCount: 60 # 最大的循环周期, 设置范围[60, ++], 默认60 MaxTickCount: 60 # 最大的循环周期, 设置范围[60, ++], 默认60

@ -115,6 +115,7 @@ type cacheConf struct {
type eventManagerConf struct { type eventManagerConf struct {
MinWorker int MinWorker int
MaxTempWorker int
MaxEventBuf int MaxEventBuf int
MaxTempEventBuf int MaxTempEventBuf int
MaxTickCount int MaxTickCount int

@ -107,7 +107,7 @@ func initEventManager() {
if cfg.If("Metrics") { if cfg.If("Metrics") {
opts = append(opts, pool.WorkerHookOpt(NewEventWorkerHook("default", statistics.NewMetricCache()))) opts = append(opts, pool.WorkerHookOpt(NewEventWorkerHook("default", statistics.NewMetricCache())))
} }
opts = append(opts, pool.MaxTickCountOpt(s.MaxTickCount), pool.TickWaitTimeOpt(s.TickWaitTime)) opts = append(opts, pool.MaxTickCountOpt(s.MaxTickCount), pool.TickWaitTimeOpt(s.TickWaitTime), pool.MaxTempWorkerOpt(s.MaxTempWorker))
_defaultEventManager = NewEventManager(func(req Event, err error) { _defaultEventManager = NewEventManager(func(req Event, err error) {
if err != nil { if err != nil {
logrus.Errorf("handle event[%s] occurs error: %s", req.Name(), err) logrus.Errorf("handle event[%s] occurs error: %s", req.Name(), err)

@ -65,7 +65,7 @@ func initMetricManager() {
} else { } else {
opts = append(opts, pool.MaxRequestTempBufOpt(10)) opts = append(opts, pool.MaxRequestTempBufOpt(10))
} }
opts = append(opts, pool.MaxTickCountOpt(s.MaxTickCount), pool.TickWaitTimeOpt(s.TickWaitTime)) opts = append(opts, pool.MaxTickCountOpt(s.MaxTickCount), pool.TickWaitTimeOpt(s.TickWaitTime), pool.MaxTempWorkerOpt(s.MaxTempWorker))
_defaultMetricManager = event.NewEventManager(func(req Metric, err error) { _defaultMetricManager = event.NewEventManager(func(req Metric, err error) {
if err != nil { if err != nil {
logrus.Errorf("handle event[%s] occurs error: %s", req.Name(), err) logrus.Errorf("handle event[%s] occurs error: %s", req.Name(), err)

Loading…
Cancel
Save