From a95200c758797c0c0560ed2258b402c91700c62b Mon Sep 17 00:00:00 2001 From: Emil Date: Thu, 4 Feb 2021 15:42:51 +0800 Subject: [PATCH] fix doc string --- django_logic/state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_logic/state.py b/django_logic/state.py index 16c916e..8b34c4c 100644 --- a/django_logic/state.py +++ b/django_logic/state.py @@ -74,7 +74,7 @@ class RedisState(State): def lock(self): """ It locks the state only once for 3 years. - nx - sets the value only + nx - sets the value only once, if it was set up before it guarantees to return False. It returns True if it's been locked and False otherwise. """ return cache.set(self._get_hash(), True, 99999999, nx=True) or False