hardnened
This commit is contained in:
@@ -48,9 +48,9 @@ class ProblemScannerThread(threading.Thread):
|
||||
|
||||
for folder in PROBLEMS_DIR.iterdir():
|
||||
if folder.is_dir():
|
||||
# Dynamically find manifest file (manifest.json or manifets.json)
|
||||
# Dynamically find manifest file (manifest.json or manifests.json)
|
||||
manifest_path = None
|
||||
for candidate in ["manifest.json", "manifets.json"]:
|
||||
for candidate in ["manifest.json", "manifests.json"]:
|
||||
candidate_path = folder / candidate
|
||||
if candidate_path.exists():
|
||||
manifest_path = candidate_path
|
||||
@@ -118,7 +118,7 @@ class ProblemScannerThread(threading.Thread):
|
||||
except sqlite3.OperationalError as e:
|
||||
if 'locked' in str(e).lower():
|
||||
wait_time = 0.2 + random.random() * 0.3
|
||||
print(f"Database locked, retrying in {wait_time:.2f}s (attempt {attempt + 1})")
|
||||
print(f"[ WARNING ]: Database locked, retrying in {wait_time:.2f}s (attempt {attempt + 1})")
|
||||
time.sleep(wait_time)
|
||||
else:
|
||||
print(f"[ ERROR ]: Database error: {e}")
|
||||
|
||||
Reference in New Issue
Block a user