Skip to main content

LocalResourceInfo

LocalResourceInfo.resource_env_vars

LocalResourceInfo.resource_env_vars: dict[str, str]

Mapping from environment variable (appended to an execution command which is dependent on this local resource) to keys in setup command JSON output.


LocalResourceInfo.setup

LocalResourceInfo.setup: cmd_args

Command to run to initialize a local resource.

Running this command writes a JSON to stdout. This JSON represents a pool of local resources which are ready to be used. Example JSON would be:

{
  "pid": 42,
  "resources": [
    {"socket_address": "foo:1"},
    {"socket_address": "bar:2"}
  ]
}

Where "pid" maps to a PID of a process which should be sent SIGTERM to release the pool of resources when they are no longer needed. "resources" maps to the pool of resources. When a local resource from this particular pool is needed for an execution command, single entity will be reserved from the pool, for example {"socket_address": "bar:2"} and environment variable with name resolved using mapping in resource_env_vars field and "socket_address" key will be added to execution command.


LocalResourceInfo.setup_timeout_seconds

LocalResourceInfo.setup_timeout_seconds: None | float | int

Timeout in seconds for setup command.