From 06caf56f119df53940a246ea1c36971551cee767 Mon Sep 17 00:00:00 2001 From: xinwen Date: Fri, 3 Dec 2021 17:32:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20redis=20=E9=94=81=E5=9C=A8redis=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E7=8E=AF=E5=A2=83=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/utils/lock.py | 2 +- requirements/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/common/utils/lock.py b/apps/common/utils/lock.py index 41b6376cf..f52c28b68 100644 --- a/apps/common/utils/lock.py +++ b/apps/common/utils/lock.py @@ -49,7 +49,7 @@ class DistributedLock(RedisLock): else: auto_renewal = False - super().__init__(redis_client=redis, name=name, expire=expire, auto_renewal=auto_renewal) + super().__init__(redis_client=redis, name='{'+name+'}', expire=expire, auto_renewal=auto_renewal) self._release_on_transaction_commit = release_on_transaction_commit self._release_raise_exc = release_raise_exc self._reentrant = reentrant diff --git a/requirements/requirements.txt b/requirements/requirements.txt index b3873af1d..ac931660e 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -95,7 +95,7 @@ python-cas==1.5.0 ipython huaweicloud-sdk-python==1.0.21 django-redis==4.11.0 -python-redis-lock==3.5.0 +python-redis-lock==3.7.0 jumpserver-django-oidc-rp==0.3.7.8 django-mysql==3.9.0 gmssl==3.2.1