1.修复自动创建下一期bug

This commit is contained in:
2026-05-26 17:49:32 +08:00
parent 5f8f5aa4ca
commit 5d33b13c6f
3 changed files with 197 additions and 235 deletions

View File

@@ -68,6 +68,23 @@ final class GameHotDataLock
}
}
/**
* 管理员强制操作前释放可能残留的互斥锁(仅删 key不校验 token
*/
public static function forceRelease(string $type, string $resourceKey): void
{
if ($resourceKey === '') {
return;
}
try {
$client = Redis::connection()->client();
if (is_object($client) && method_exists($client, 'del')) {
$client->del(self::lockKey($type, $resourceKey));
}
} catch (Throwable) {
}
}
public static function release(string $type, string $resourceKey, ?string $token, bool $redisLock): void
{
if ($resourceKey === '' || !$redisLock || $token === null || $token === '') {