Fixed refinement

This commit is contained in:
=
2026-02-04 22:10:19 -05:00
parent 3a80307cc2
commit df7cee9524
5 changed files with 53 additions and 7 deletions

View File

@@ -378,6 +378,9 @@ def refine_bible_task(project_path, instruction, source_type, selected_keys=None
try:
bible_path = os.path.join(project_path, "bible.json")
draft_path = os.path.join(project_path, "bible_draft.json")
lock_path = os.path.join(project_path, ".refining")
with open(lock_path, 'w') as f: f.write("running")
base_bible = utils.load_json(bible_path)
if not base_bible: return False
@@ -408,4 +411,6 @@ def refine_bible_task(project_path, instruction, source_type, selected_keys=None
except Exception as e:
utils.log("ERROR", f"Bible refinement task failed: {e}")
return False
return False
finally:
if os.path.exists(lock_path): os.remove(lock_path)