Move get_workflow_script_by_cache_key_value to replica (#4303)

This commit is contained in:
Stanislav Novosad
2025-12-15 16:05:14 -07:00
committed by GitHub
parent 781bd13c5a
commit 1e5b8b36c1
2 changed files with 4 additions and 4 deletions

View File

@@ -418,7 +418,7 @@ async def get_workflow_script_blocks(
raise HTTPException(status_code=404, detail="Workflow not found")
workflow_run_id = block_script_request.workflow_run_id
if workflow_run_id:
workflow_run = await app.DATABASE.get_workflow_run(
workflow_run = await app.REPLICA_DATABASE.get_workflow_run(
workflow_run_id=workflow_run_id,
organization_id=current_org.organization_id,
)
@@ -441,7 +441,7 @@ async def get_workflow_script_blocks(
cache_key = block_script_request.cache_key or workflow.cache_key or ""
status = block_script_request.status
script = await app.DATABASE.get_workflow_script_by_cache_key_value(
script = await app.REPLICA_DATABASE.get_workflow_script_by_cache_key_value(
organization_id=current_org.organization_id,
workflow_permanent_id=workflow_permanent_id,
workflow_run_id=block_script_request.workflow_run_id,