1
This commit is contained in:
10
app/service/utils/generate_uuid.py
Normal file
10
app/service/utils/generate_uuid.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import threading
|
||||
import uuid
|
||||
|
||||
id_lock = threading.Lock()
|
||||
|
||||
|
||||
def generate_uuid():
|
||||
with id_lock:
|
||||
unique_id = str(uuid.uuid1())
|
||||
return unique_id
|
||||
Reference in New Issue
Block a user