hardnened

This commit is contained in:
2025-08-18 21:16:46 +02:00
parent f3baec17e4
commit 27f955151a
2 changed files with 418 additions and 91 deletions

View File

@@ -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}")