This commit is contained in:
2021-03-29 15:25:39 +08:00
parent 345ead8ba4
commit 7aa303ea16
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ class Redis extends Component
* @return bool
* @throws Exception
*/
public function lock($key, $timeout = 5)
public function lock($key, $timeout = 5): bool
{
$script = <<<SCRIPT
local _nx = redis.call('setnx',KEYS[1], ARGV[1])