1.修复自动创建下一期bug
This commit is contained in:
@@ -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 === '') {
|
||||
|
||||
Reference in New Issue
Block a user