turbaszek commented on a change in pull request #10956:
URL: https://github.com/apache/airflow/pull/10956#discussion_r492052170
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -868,122 +608,41 @@ def process_file(
except Exception: # pylint: disable=broad-except
self.log.exception("Failed at reloading the DAG file %s",
file_path)
Stats.incr('dag_file_refresh_error', 1, 1)
- return [], 0
+ return 0, 0
if len(dagbag.dags) > 0:
self.log.info("DAG(s) %s retrieved from %s", dagbag.dags.keys(),
file_path)
else:
self.log.warning("No viable dags retrieved from %s", file_path)
self.update_import_errors(session, dagbag)
- return [], len(dagbag.import_errors)
+ return 0, len(dagbag.import_errors)
try:
self.execute_on_failure_callbacks(dagbag,
failure_callback_requests)
except Exception: # pylint: disable=broad-except
self.log.exception("Error executing failure callback!")
- # Save individual DAGs in the ORM and update
DagModel.last_scheduled_time
+ # Save individual DAGs in the ORM
+ dagbag.read_dags_from_db = True
Review comment:
Why we don't initialize the `DagBag` in L607 with this parameter?
----------------------------------------------------------------
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]