nuclearpinguin commented on a change in pull request #7674: [AIRFLOW-7022]
Simplify DagFileProcessor.process_file method
URL: https://github.com/apache/airflow/pull/7674#discussion_r390248231
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -853,6 +853,32 @@ def process_file(
ti_keys_to_schedule = self._process_dags(dags, session)
+ self._schedule_task_instances(dagbag, ti_keys_to_schedule, session)
+
+ # Record import errors into the ORM
+ try:
+ self.update_import_errors(session, dagbag)
+ except Exception: # pylint: disable=broad-except
+ self.log.exception("Error logging import errors!")
+
+ return simple_dags, len(dagbag.import_errors)
+
+ @provide_session
+ def _schedule_task_instances(
+ self,
+ dagbag: models.DagBag,
Review comment:
```suggestion
dagbag: DagBag,
```
Can we use explicit type?
----------------------------------------------------------------
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]
With regards,
Apache Git Services