Skip to content

Commit

Permalink
fix doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
emil-balashov committed Feb 4, 2021
1 parent 9ffbf13 commit a95200c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_logic/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a95200c

Please sign in to comment.