Psuedo python code.
def update_tags(product):
update-tag-based-on-stuff
def products(p,h,**kwargs)
// Get Products
for product in products:
update_tags(product)
with models.DAG(
"fetchProducts",
default_args=default_args,
schedule_interval=None
) as dag:
get_products = PythonOperator(
task_id = 'get_products',
python_callable = products,
op_kwargs = {'p':params, 'h':headers},
provide_context=True
);
get_products >> ??
What I am trying to achieve.
When the products loop is triggered, I want it to spawn a task (update_tags) in AirFlow and then proceed to the next loop, i.e. Don't wait for the task to finish.
My airflow.cfg is using localExecutor.