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