Thread
#prefect-community
    d

    Dan DiPasquo

    2 years ago
    Working on upgrade to 0.11.... from a state_handler invocation, we need to access the return value of write() method on a custom ResultHandler (now wrapped inside a ResultHandlerResult instance as I understand it). The state handler receives a new_state instance, but as I read it there's a getter on State.result that gives back a scalar value rather than the result instance from which I might access location attribute where result_handler.write() retval appears to be stored. What is the right way to access this?
    Chris White

    Chris White

    2 years ago
    Hi Dan - you can find the full result instance at state._result
    (Note the underscore)
    d

    Dan DiPasquo

    2 years ago
    Thanks Chris. We were doing
    new_state._result.safe_value.value
    previously, but that seemed to break with 0.11. I will revisit that.
    Chris White

    Chris White

    2 years ago
    Ah gotcha so the new “safe value” is now state._result.location
    d

    Dan DiPasquo

    2 years ago
    Awesome, was just going to try that - thank you!
    🎯
    Chris White

    Chris White

    2 years ago
    💯