This commit is contained in:
@@ -449,6 +449,13 @@ func RedisPackageUsageRemainderKey(carrierType string, carrierID uint) string {
|
||||
return fmt.Sprintf("package:usage:remainder:%s:%d", carrierType, carrierID)
|
||||
}
|
||||
|
||||
// RedisCardTrafficSyncLockKey 生成卡流量同步锁 Redis 键
|
||||
// 用途:串行化轮询与手动刷新,避免同一上游读数被重复扣减套餐流量
|
||||
// 过期时间:10 分钟
|
||||
func RedisCardTrafficSyncLockKey(cardID uint) string {
|
||||
return fmt.Sprintf("traffic:sync:lock:card:%d", cardID)
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// 轮询分片队列相关 Redis Key
|
||||
// ========================================
|
||||
|
||||
Reference in New Issue
Block a user