@task def multi_push(**context): context['ti'].xcom_push(key='count', value=100) context['ti'].xcom_push(key='status', value='ok') return "main_return" # goes to default XCom key 'return_value'
XCom operations involve two main actions: (sending data) and Pulling (retrieving data). 1. Pushing Data
print(f"Loading data from file_path with count records")
r.rpush(key, json.dumps(payload)) item = r.rpop(key) # None if empty; item is removed atomically