Skip to content

Commit 557bde2

Browse files
committed
#98 新增支持 Redis 哨兵模式、集群模式 cache、lock、queue、rate-limit 改造兼容
1 parent 508197b commit 557bde2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WorkerLimiterLock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static function lock($name, $max, $timeout, $poolName = null)
2020
{
2121
$now = microtime(true);
2222
$args = [
23-
$name, // 名称
23+
'{' . $name . '}', // 名称
2424
$max, // 最大允许数量
2525
$now, // 当前时间
2626
null === $timeout ? null : ($now + $timeout), // 过期时间
@@ -85,7 +85,7 @@ public static function lock($name, $max, $timeout, $poolName = null)
8585
public static function unlock($name, $workerId, $poolName = null)
8686
{
8787
$args = [
88-
$name, // 名称
88+
'{' . $name . '}', // 名称
8989
$workerId, // 任务ID
9090
];
9191
$numKeys = 1;

0 commit comments

Comments
 (0)