Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update python functions in airflow without the need to restart airflow webserver

Tags:

python

airflow

I'm learning to use airflow to schedule some python ETL processes. Each time I update my python code I have to restart the webserver and also rename the DAG before code changes are picked up by airflow. Is there anyway around this, especially so I dont have to be renaming my DAG each time I make changes?

like image 521
DougKruger Avatar asked Nov 26 '22 14:11

DougKruger


1 Answers

On the webserver the changes may not be apparent but you can click the refresh button next to the DAG that you modify and it will reload the DAG manually.

The scheduler will always use the latest code without need for a reboot.

See here: https://gtoonstra.github.io/etl-with-airflow/gotchas.html

like image 139
Necravolver Avatar answered Dec 21 '22 23:12

Necravolver