https://prefect.io logo
s

Suresh R

08/22/2022, 11:44 AM
Hi! I want to pass a custom variable for my state handler to use it, how can i do that?
1
a

Anna Geller

08/22/2022, 1:37 PM
the same way you would pass variables to any other function in Python, this might help https://discourse.prefect.io/t/how-to-take-action-on-a-state-change-of-a-task-run-task-level-state-handler/82 but if you are asking how to pass Parameter task values, you can grab those from context:
Copy code
prefect.context.parameters.get("your_param_name")