Other Topics
Runtime Variables
Accessing information about the runtime while running tasks
Available Runtime Variables
In order to access information about the runtime while running a task, you can use the context
value.
context
includes important contextual information about the runtime, like the current task_id
and callback_url
.
Field Name | Purpose |
---|---|
container_id | Unique identifier for a container |
stub_id | Identifier for a stub |
stub_type | Type of the stub (function, endpoint, taskqueue, etc) |
callback_url | URL called when the task status changes |
task_id | Identifier for the specific task |
timeout | Maximum time allowed for the task to run (seconds) |
on_start_value | Any values returned from the on_start function |
bind_port | Port number to bind a service to |
python_version | Version of Python to be used |
Using a Runtime Variable
Any of the fields above can be accessed on the context
variable:
Was this page helpful?