fix exam 考试

This commit is contained in:
zty 2024-07-29 16:39:20 +08:00
parent af9315629d
commit 37621e170b
1 changed files with 1 additions and 0 deletions

View File

@ -731,6 +731,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)
print(lock, identifier)
return identifier if lock else None
def release_lock(lock_name, identifier):