Skip to main content

prefect.runtime.task_run

Access attributes of the current task run dynamically. Note that if a task run cannot be discovered, all attributes will return empty values. You can mock the runtime attributes for testing purposes by setting environment variables prefixed with PREFECT__RUNTIME__TASK_RUN. Available attributes:
  • id: the task run’s unique ID
  • name: the name of the task run
  • tags: the task run’s set of tags
  • parameters: the parameters the task was called with
  • run_count: the number of times this task run has been run
  • task_name: the name of the task

Functions

get_id

get_tags

get_run_count

get_name

get_task_name

get_parameters

get_task_run_api_url

get_task_run_ui_url