fix empty cache_key_value for block run cache (#3610)
This commit is contained in:
@@ -61,10 +61,6 @@ async def get_workflow_script(
|
||||
cache_key = workflow.cache_key or ""
|
||||
rendered_cache_key_value = ""
|
||||
|
||||
if block_labels:
|
||||
# Do not generate script or run script if block_labels is provided
|
||||
return None, rendered_cache_key_value
|
||||
|
||||
try:
|
||||
parameter_tuples = await app.DATABASE.get_workflow_run_parameters(
|
||||
workflow_run_id=workflow_run.workflow_run_id,
|
||||
@@ -73,6 +69,10 @@ async def get_workflow_script(
|
||||
|
||||
rendered_cache_key_value = jinja_sandbox_env.from_string(cache_key).render(parameters)
|
||||
|
||||
if block_labels:
|
||||
# Do not generate script or run script if block_labels is provided
|
||||
return None, rendered_cache_key_value
|
||||
|
||||
# Check if there are existing cached scripts for this workflow + cache_key_value
|
||||
existing_scripts = await app.DATABASE.get_workflow_scripts_by_cache_key_value(
|
||||
organization_id=workflow.organization_id,
|
||||
|
||||
Reference in New Issue
Block a user