Fix: Initialize first_stage_tasks and entity_relation_task to prevent empty-task cancel errors
- Initialize first_stage_tasks = [] and entity_relation_task = None at coroutine start - Ensure cancel block safely handles no-op when tasks lists are empty
This commit is contained in:
parent
ffb642a5ce
commit
eb2320e556
1 changed files with 11 additions and 9 deletions
|
|
@ -1229,6 +1229,8 @@ class LightRAG:
|
||||||
async with semaphore:
|
async with semaphore:
|
||||||
nonlocal processed_count
|
nonlocal processed_count
|
||||||
current_file_number = 0
|
current_file_number = 0
|
||||||
|
first_stage_tasks = []
|
||||||
|
entity_relation_task = None
|
||||||
try:
|
try:
|
||||||
# Get file path from status document
|
# Get file path from status document
|
||||||
file_path = getattr(
|
file_path = getattr(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue