12 lines
211 B
Python
12 lines
211 B
Python
|
from uuid import uuid4
|
||
|
|
||
|
from rectes.redis_db import redis
|
||
|
|
||
|
|
||
|
async def get_new_key() -> str:
|
||
|
while True:
|
||
|
new_key = str(uuid4())
|
||
|
|
||
|
if not await redis.exists(new_key):
|
||
|
return new_key
|