cache invalidation update - only delete cached code for impacted block and blocks after the impacted (#3908)

This commit is contained in:
Shuchang Zheng
2025-11-05 15:26:11 +08:00
committed by GitHub
parent 3c3b5c2db9
commit 02fc0d9dda
2 changed files with 248 additions and 2 deletions

View File

@@ -4612,6 +4612,7 @@ class AgentDB:
run_signature: str | None = None,
workflow_run_id: str | None = None,
workflow_run_block_id: str | None = None,
clear_run_signature: bool = False,
) -> ScriptBlock:
async with self.Session() as session:
script_block = (
@@ -4624,7 +4625,9 @@ class AgentDB:
if script_block:
if script_file_id is not None:
script_block.script_file_id = script_file_id
if run_signature is not None:
if clear_run_signature:
script_block.run_signature = None
elif run_signature is not None:
script_block.run_signature = run_signature
if workflow_run_id is not None:
script_block.workflow_run_id = workflow_run_id