jedcunningham commented on a change in pull request #18243:
URL: https://github.com/apache/airflow/pull/18243#discussion_r708463072



##########
File path: airflow/models/dag.py
##########
@@ -2814,10 +2815,24 @@ def deactivate_deleted_dags(cls, alive_dag_filelocs: 
List[str], session=None):
         """
         log.debug("Deactivating DAGs (for which DAG files are deleted) from %s 
table ", cls.__tablename__)
 
+        dag_filelocs = []
+        for fileloc in alive_dag_filelocs:
+            if zipfile.is_zipfile(fileloc):
+                with zipfile.ZipFile(fileloc) as z:
+                    dag_filelocs.extend(

Review comment:
       I wonder if this should be done once in `_refresh_dag_dir` instead of 
done twice here and in `remove_deleted_dags`?




-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to