potiuk commented on a change in pull request #10501:
URL: https://github.com/apache/airflow/pull/10501#discussion_r475846873



##########
File path: airflow/models/dag.py
##########
@@ -1469,7 +1515,7 @@ def create_dagrun(self,
                       run_id=None,
                       start_date=None,
                       external_trigger=False,
-                      conf=None,
+                      conf_dict=None,

Review comment:
       Resolved.

##########
File path: airflow/models/dag.py
##########
@@ -1865,22 +1925,31 @@ def deactivate_deleted_dags(cls, alive_dag_filelocs: 
List[str], session=None):
 
         dag_models = session.query(cls).all()
         try:
-            for dag_model in dag_models:
-                if dag_model.fileloc is not None:
-                    if correct_maybe_zipped(dag_model.fileloc) not in 
alive_dag_filelocs:
-                        dag_model.is_active = False
-                    else:
-                        # If is_active is set as False and the DAG File still 
exists
-                        # Change is_active=True
-                        if not dag_model.is_active:
-                            dag_model.is_active = True
-                else:
-                    continue
+            cls._deactivate_deleted_dags_in_models(alive_dag_filelocs, 
dag_models)
             session.commit()
         except Exception:
             session.rollback()
             raise
 
+    @classmethod
+    def _deactivate_deleted_dags_in_models(cls, alive_dag_filelocs, 
dag_models):
+        """Loop through all models and deactivate te DAGs."""

Review comment:
       Resolved.




----------------------------------------------------------------
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