fix exam
This commit is contained in:
parent
ef0e55ecc0
commit
7a96810c5f
|
@ -730,7 +730,7 @@ class ExamRecordViewSet(ListModelMixin, DestroyModelMixin, RetrieveModelMixin, G
|
|||
|
||||
def acquire_lock(lock_name, timeout=60):
|
||||
identifier = str(uuid.uuid4())
|
||||
lock = cache.set(lock_name, identifier, timeout=timeout, nx=True)
|
||||
lock = cache.set(lock_name, identifier, timeout=timeout)
|
||||
return identifier if lock else None
|
||||
|
||||
def release_lock(lock_name, identifier):
|
||||
|
|
Loading…
Reference in New Issue