ChristianYeah commented on issue #9131:
URL: https://github.com/apache/airflow/issues/9131#issuecomment-655984064


   > @ChristianYeah Thanks. I can't reproduce it though. Feel free to share 
full dag run file including deafult settings and tasks, as well as how you 
trigger the dag run.
   
   Hi, @svetli-n , sorry for the late reponse, here is the code
   
   ```
   # coding:utf-8
   import airflow
   from airflow import DAG
   from airflow.operators.dummy_operator import DummyOperator
   from airflow.operators.python_operator import PythonOperator
   from fabric import Connection
   
   default_args = {
       'owner': 'yexiaodong',
   }
   
   dag = DAG(
       dag_id='sync_dags',
       default_args=default_args,
       schedule_interval=None,
       start_date=airflow.utils.dates.days_ago(1),
       max_active_runs=1,
   )
   
   
   def git_pull_function():
       for host in ["172.16.16.178", "172.16.16.177"]:
           with Connection(host=host, user='ops', port=22) as c:
               result = c.run('cd /home/ops/code/master_dag_repo && git pull')
               print(host, result)
   
   
   git_pull = PythonOperator(
       task_id='git-pull',
       python_callable=git_pull_function,
       dag=dag,
   )
   
   ```
   
   I would like to limit the max active dag run to 1 for ensuring the sync 
progress won't go wrong. It works on the local env, but the production env 
seems like not working as expected
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to