mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 18:26:16 +00:00
23 lines
378 B
Go
23 lines
378 B
Go
package mq
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/GMWalletApp/epusdt/config"
|
|
)
|
|
|
|
var (
|
|
startOnce sync.Once
|
|
callbackLimiter chan struct{}
|
|
callbackInflight sync.Map
|
|
)
|
|
|
|
func Start() {
|
|
startOnce.Do(func() {
|
|
callbackLimiter = make(chan struct{}, config.GetQueueConcurrency())
|
|
go runOrderExpirationLoop()
|
|
go runOrderCallbackLoop()
|
|
go runTransactionLockCleanupLoop()
|
|
})
|
|
}
|