nib
07/07/2021, 12:14 PMnew_state.result) and error details. But it’s empty and I can get only “Some reference tasks failed.” from new_state . Is it possible to extract this kind of details?Kevin Kho
from prefect import task
from prefect.backend import TaskRunView
# Presume we have a flow with the following task
@task
def foo():
  return "foobar!"
# Instantiate a task run directly
task_run = TaskRunView.from_task_slug("foo-1", flow_run_id="")
# As with the other views, we can inspect the task run
task_run.state      # Success(...)
task_run.map_index  # -1  (not mapped)
# We can also retrieve results
task_run.get_result()  # "foobar!"Kevin Kho
nib
07/07/2021, 3:05 PMRanu Goldan
07/16/2021, 5:46 AMKevin Kho