dataflow.get_running_instance_id
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Obtains IDs of running instances of the current UDF during execution. This information is sourced from the logic_device_list configuration in the data_flow_deploy_info.json file.
Prototype
1 | get_running_instance_id() |
Parameters
None
Returns
IDs of running instances of the current UDF. The data type is int.
Examples
1 2 3 4 5 6 | import dataflow as df @df.pyflow def func(): print('running instance_id = ', df.get_running_instance_id()) return a + b |
Constraints
This API must be used with the pyflow decorator.
Parent topic: Runtime APIs