https://prefect.io logo
#prefect-community
Title
# prefect-community
e

Eric Feldman

10/27/2021, 4:02 PM
Hey again 🙂 I’m trying to get the params that flow was run with in a state handler method but
new_state.result
keeps being an empty dict when running on prefect agent if i’m running the flow using
flow.run
I do see the results of the state
a

Anna Geller

10/27/2021, 4:09 PM
@Eric Feldman within the state handler, you should be able to retrieve the parameters from Prefect context:
Copy code
prefect.context.get("parameters")
e

Eric Feldman

10/27/2021, 4:13 PM
Thanks 🦜!!
k

Kevin Kho

10/27/2021, 6:26 PM
The
results
is not populated for runs with backend because it can be expensive to keep them all in memory.
9 Views