Skip to content

Commit

Permalink
Add new type of exception to catch timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
VladaZakharova committed Sep 6, 2024
1 parent daa66c3 commit abc883a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airflow/models/dagbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
AirflowDagCycleException,
AirflowDagDuplicatedIdException,
AirflowException,
AirflowTaskTimeout,
)
from airflow.listeners.listener import get_listener_manager
from airflow.models.base import Base
Expand Down Expand Up @@ -350,7 +351,7 @@ def parse(mod_name, filepath):
sys.modules[spec.name] = new_module
loader.exec_module(new_module)
return [new_module]
except Exception as e:
except (Exception, AirflowTaskTimeout) as e:
DagContext.autoregistered_dags.clear()
self.log.exception("Failed to import: %s", filepath)
if self.dagbag_import_error_tracebacks:
Expand Down

0 comments on commit abc883a

Please sign in to comment.