mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-03 04:07:39 +08:00
优化消息队列-当没有新消息时加大延迟时间
This commit is contained in:
@@ -190,7 +190,7 @@ func (cs *CustomerSubscriber) publishToCustomer(topicData []TopicData) bool {
|
||||
|
||||
if len(topicData) == 0 {
|
||||
//没有任何数据待一秒吧
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
time.Sleep(time.Second * 1)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user