pingzh commented on code in PR #22917:
URL: https://github.com/apache/airflow/pull/22917#discussion_r870551878


##########
airflow/dag_processing/manager.py:
##########
@@ -514,6 +514,10 @@ def _deactivate_stale_dags(self, session=None):
                 if deactivated:
                     self.log.info("Deactivated %i DAGs which are no longer 
present in file.", deactivated)
 
+                for dag_id in to_deactivate:
+                    SerializedDagModel.remove_dag(dag_id)
+                    self.log.info("Deleted DAG %s in serialized_dag table", 
dag_id)
+

Review Comment:
   @kaxil `remove_deleted_dags` only removes dags whose dag_files are deleted.
   
   this pr takes care of the case like a dag_id is renamed in a dag_file, or 
some dag_ids are removed in a dag_file



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to