Join Slack
Powered by
Can I access a flow's run ID from a state handler?...
# ask-community
a
Adam Roderick
02/28/2020, 11:32 PM
Can I access a flow's run ID from a state handler? I want to generate a URL to the logs in Prefect Cloud, and I need the run ID to do that
d
Dylan
02/28/2020, 11:35 PM
Hey Adam, I’m out of pocket at the moment but I believe the flow run ID is in
prefect.co
ntext
Dylan
02/28/2020, 11:35 PM
If that’s accessible from the state handler
a
Adam Roderick
02/28/2020, 11:35 PM
Thanks!
Adam Roderick
02/28/2020, 11:35 PM
prefect.context is accessible. I see no flow_run_id, so I assume that is only available when running in cloud
d
Dylan
02/28/2020, 11:36 PM
https://docs.prefect.io/api/latest/utilities/context.html#context-2
Dylan
02/28/2020, 11:36 PM
Yes, I believe that’s correct
a
Adam Roderick
02/28/2020, 11:36 PM
Perfect. Thanks again. Looks right
👍 1
2
Views
Open in Slack
Previous
Next