refactor: harden task authority and room mutations

This commit is contained in:
ANG-Server
2026-07-23 00:59:00 +08:00
parent 3f14230e15
commit 968a672fbd
24 changed files with 748 additions and 64 deletions

View File

@@ -45,6 +45,13 @@ export interface IRedisService {
*/
set(key: string, value: string, ttl?: number): Promise<void>;
/**
* 仅当键不存在时设置值,用于 nonce、幂等键等原子占位。
*
* @returns 成功占位返回 true键已存在返回 false
*/
setIfAbsent(key: string, value: string, ttl?: number): Promise<boolean>;
/**
* 设置键值对并指定过期时间
*