Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 20 additions & 28 deletions task-sdk/src/airflow/sdk/bases/xcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ def get_value(
match the criteria, an arbitrary one is returned.

:param ti_key: The TaskInstanceKey to look up the XCom for.
:param key: A key for the XCom. If provided, only XCom with matching
keys will be returned. Pass *None* (default) to remove the filter.
:param key: A key for the XCom. Only XCom with this key will be returned.
"""
return cls.get_one(
key=key,
Expand All @@ -225,8 +224,7 @@ async def aget_value(
match the criteria, an arbitrary one is returned.

:param ti_key: The TaskInstanceKey to look up the XCom for.
:param key: A key for the XCom. If provided, only XCom with matching
keys will be returned. Pass *None* (default) to remove the filter.
:param key: A key for the XCom. Only XCom with this key will be returned.
"""
return await cls.aget_one(
key=key,
Expand Down Expand Up @@ -259,14 +257,12 @@ def _get_xcom_db_ref(
have a structured TaskInstance or TaskInstanceKey object available.

:param run_id: Dag run ID for the task.
:param dag_id: Only pull XCom from this Dag. Pass *None* (default) to
remove the filter.
:param task_id: Only XCom from task with matching ID will be pulled.
Pass *None* (default) to remove the filter.
:param map_index: Only XCom from task with matching ID will be pulled.
Pass *None* (default) to remove the filter.
:param key: A key for the XCom. If provided, only XCom with matching
keys will be returned. Pass *None* (default) to remove the filter.
:param dag_id: Dag ID to pull the XCom from.
:param task_id: Task ID to pull the XCom from.
:param map_index: Map index of the task instance to pull the XCom from.
*None* (default) pulls the XCom of a non-mapped task, which has
map index ``-1``.
:param key: A key for the XCom. Only XCom with this key will be returned.
"""
from airflow.sdk.execution_time.task_runner import SUPERVISOR_COMMS

Expand Down Expand Up @@ -309,14 +305,12 @@ def get_one(
have a structured TaskInstance or TaskInstanceKey object available.

:param run_id: Dag run ID for the task.
:param dag_id: Only pull XCom from this Dag. Pass *None* (default) to
remove the filter.
:param task_id: Only XCom from task with matching ID will be pulled.
Pass *None* (default) to remove the filter.
:param map_index: Only XCom from task with matching ID will be pulled.
Pass *None* (default) to remove the filter.
:param key: A key for the XCom. If provided, only XCom with matching
keys will be returned. Pass *None* (default) to remove the filter.
:param dag_id: Dag ID to pull the XCom from.
:param task_id: Task ID to pull the XCom from.
:param map_index: Map index of the task instance to pull the XCom from.
*None* (default) pulls the XCom of a non-mapped task, which has
map index ``-1``.
:param key: A key for the XCom. Only XCom with this key will be returned.
:param include_prior_dates: If *False* (default), only XCom from the
specified Dag run is returned. If *True*, the latest matching XCom is
returned regardless of the run it belongs to.
Expand Down Expand Up @@ -373,14 +367,12 @@ async def aget_one(
have a structured TaskInstance or TaskInstanceKey object available.

:param run_id: Dag run ID for the task.
:param dag_id: Only pull XCom from this Dag. Pass *None* (default) to
remove the filter.
:param task_id: Only XCom from task with matching ID will be pulled.
Pass *None* (default) to remove the filter.
:param map_index: Only XCom from task with matching ID will be pulled.
Pass *None* (default) to remove the filter.
:param key: A key for the XCom. If provided, only XCom with matching
keys will be returned. Pass *None* (default) to remove the filter.
:param dag_id: Dag ID to pull the XCom from.
:param task_id: Task ID to pull the XCom from.
:param map_index: Map index of the task instance to pull the XCom from.
*None* (default) pulls the XCom of a non-mapped task, which has
map index ``-1``.
:param key: A key for the XCom. Only XCom with this key will be returned.
:param include_prior_dates: If *False* (default), only XCom from the
specified Dag run is returned. If *True*, the latest matching XCom is
returned regardless of the run it belongs to.
Expand Down