Question: Is it possible for 2 parent flows to acc...
# ask-community
a
Question: Is it possible for 2 parent flows to access the same child run id?
k
Hey @Arun Giridharan, if you are on Cloud, I think this is a good use case for the KV Store. You can persist the value of the child run id and then retrieve it later maybe?
a
@Kevin Kho interesting! How does KV Store handle concurrency issues?
k
I believe it’s pretty lightweight. Fetching keys should be fast. You may run into issues with reading or writing though if the two parents flows are doing it simultaneously. You can also use the GraphQL API maybe to find that child flow id if you know what you are looking for?
1
a
is there a way to this in just Prefect Core?
k
Maybe if you maintain your own Redis cache? It needs to be cached somewhere, but how can you trigger flows with just Prefect core? I though they need to be registered and run to get those ids
a
This may be a silly question but how can I get a flow id during a flow?
k
Not a silly question.
prefect.context.get("flow_id")
. You can find more here