The right way to initialize the airflow from the beginning
mkdir xx/airflow_test
python -m venv venv_test(name)
source venv_test/bin/activate
(venv_test) pip install apache-airflow
(venv_test) $ cd xx/airflow_test
(venv_test) $ mkdir airflow_home
(venv_test) $ export AIRFLOW_HOME=$('pwd')/airflow_home
(venv_test) $ airflow initdb
(venv_test) $ airflow webserver
mkdir dags
build new dag under this folder
modify the max_threads in airflow.cfg from 2 to 1.
Open a new terminator
cd xxx/airflow_test
source venv_test/bin/activate
(venv_test) export AIRFLOW_HOME=$('pwd')/airflow_home
(venv_test) airflow initdb
(venv_test) airflow scheduler
If there is no updation, restart webserver and scheduler(export airflow_home for both of them!)
vim ~/.bashrc
add the line:
export AIRFLOW_HOME = /wordspace/airflow_home
1.If you want to delete all the historical data:
airflow resetdb