ashb commented on a change in pull request #5557: [AIRFLOW-4928] Move all
config parses to class properties
URL: https://github.com/apache/airflow/pull/5557#discussion_r302472103
##########
File path: airflow/models/dagbag.py
##########
@@ -72,13 +73,18 @@ class DagBag(BaseDagBag, LoggingMixin):
CYCLE_NEW = 0
CYCLE_IN_PROGRESS = 1
CYCLE_DONE = 2
+ dag_discovery_safe_mode = conf.getboolean('core',
'DAG_DISCOVERY_SAFE_MODE')
+ load_examples = conf.getboolean('core', 'LOAD_EXAMPLES')
+ dagbag_import_timeout = conf.getint('core', "DAGBAG_IMPORT_TIMEOUT")
+ unit_test_mode = conf.getboolean('core', 'unit_test_mode')
+ scheduler_zombie_task_threshold = conf.getint('scheduler',
'scheduler_zombie_task_threshold')
def __init__(
self,
dag_folder=None,
executor=None,
- include_examples=configuration.conf.getboolean('core',
'LOAD_EXAMPLES'),
- safe_mode=configuration.conf.getboolean('core',
'DAG_DISCOVERY_SAFE_MODE')):
Review comment:
Default arguments for python functions are evaluated at parse time, not run
time, so this hunk isn't needed
----------------------------------------------------------------
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