Refactor _id() function to be inline
This commit is contained in:
parent
db1ef7673e
commit
d88cf2600e
1 changed files with 1 additions and 5 deletions
|
@ -22,12 +22,8 @@ time_conversion = {
|
|||
}
|
||||
|
||||
|
||||
def _id():
|
||||
return uuid.uuid4().hex
|
||||
|
||||
|
||||
def set_password(password, ttl):
|
||||
key = _id()
|
||||
key = uuid.uuid4().hex
|
||||
redis_client.set(key, password)
|
||||
redis_client.expire(key, ttl)
|
||||
return key
|
||||
|
|
Loading…
Reference in a new issue