fix lock TTL

This commit is contained in:
Chris Lu 2024-02-04 12:47:21 -08:00
parent 44b49bec99
commit f9131de43f

View File

@ -93,10 +93,9 @@ func NewMessageBroker(option *MessageQueueBrokerOption, grpcDialOption grpc.Dial
}
})
for {
time.Sleep(time.Second)
if err := mqBroker.lockAsBalancer.AttemptToLock(lock_manager.RenewInterval); err != nil {
glog.V(0).Infof("AttemptToLock: %v", err)
time.Sleep(lock_manager.RenewInterval)
if err := mqBroker.lockAsBalancer.AttemptToLock(lock_manager.LiveLockTTL); err != nil {
glog.V(4).Infof("AttemptToLock: %v", err)
}
}
}()