Fixed refinement
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user