Luke Dolan

07/18/2023, 12:16 PM
Hey, I'm trying to access details of the flow run for a Process infrastructure what host it's running on. I see in the infrastrucutre_pid of the FlowRun there is some details on the host and process id but is there a more concrete field that defines these details?

Christopher Boyd

07/18/2023, 3:33 PM
You can do it in code, but not from the prefect process side directly no
Copy code
def log_platform_info():
    import platform
    import sys
    logger = get_run_logger()
    <|>("Host's network name = %s", platform.node())
    <|>("Python version = %s", platform.python_version())
    <|>("Platform information (instance type) = %s ", platform.platform())
    <|>("OS/Arch = %s/%s", sys.platform, platform.machine())

Luke Dolan

07/18/2023, 6:43 PM
And not from the PrefectClient then either?