fix exam 考试

This commit is contained in:
zty 2024-07-29 16:52:06 +08:00
parent 967f116c72
commit 6805c0bc41
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def dectry(p):
def acquire_lock(lock_name, timeout=60): def acquire_lock(lock_name, timeout=60):
identifier = str(uuid.uuid4()) identifier = str(uuid.uuid4())
lock = cache.set(lock_name, identifier, timeout=timeout) lock = cache.add(lock_name, identifier, timeout=timeout)
print(lock, identifier) print(lock, identifier)
return identifier if lock else None return identifier if lock else None