|
80 | 80 |
|
81 | 81 | log = LoggingMixin().log
|
82 | 82 |
|
| 83 | +DAGS_FOLDER = settings.DAGS_FOLDER |
| 84 | + |
| 85 | +if "BUILDING_AIRFLOW_DOCS" in os.environ: |
| 86 | + DAGS_FOLDER = '[AIRFLOW_HOME]/dags' |
| 87 | + |
83 | 88 |
|
84 | 89 | def sigint_handler(sig, frame):
|
85 | 90 | sys.exit(0)
|
@@ -133,7 +138,7 @@ def setup_locations(process, pid=None, stdout=None, stderr=None, log=None):
|
133 | 138 |
|
134 | 139 | def process_subdir(subdir):
|
135 | 140 | if subdir:
|
136 |
| - subdir = subdir.replace('DAGS_FOLDER', settings.DAGS_FOLDER) |
| 141 | + subdir = subdir.replace('DAGS_FOLDER', DAGS_FOLDER) |
137 | 142 | subdir = os.path.abspath(os.path.expanduser(subdir))
|
138 | 143 | return subdir
|
139 | 144 |
|
@@ -1310,8 +1315,10 @@ class CLIFactory(object):
|
1310 | 1315 | "The regex to filter specific task_ids to backfill (optional)"),
|
1311 | 1316 | 'subdir': Arg(
|
1312 | 1317 | ("-sd", "--subdir"),
|
1313 |
| - "File location or directory from which to look for the dag", |
1314 |
| - default=settings.DAGS_FOLDER), |
| 1318 | + "File location or directory from which to look for the dag. " |
| 1319 | + "Defaults to '[AIRFLOW_HOME]/dags' where [AIRFLOW_HOME] is the " |
| 1320 | + "value you set for 'AIRFLOW_HOME' config you set in 'airflow.cfg' ", |
| 1321 | + default=DAGS_FOLDER), |
1315 | 1322 | 'start_date': Arg(
|
1316 | 1323 | ("-s", "--start_date"), "Override start_date YYYY-MM-DD",
|
1317 | 1324 | type=parsedate),
|
@@ -1711,7 +1718,7 @@ class CLIFactory(object):
|
1711 | 1718 | "If reset_dag_run option is used,"
|
1712 | 1719 | " backfill will first prompt users whether airflow "
|
1713 | 1720 | "should clear all the previous dag_run and task_instances "
|
1714 |
| - "within the backfill date range." |
| 1721 | + "within the backfill date range. " |
1715 | 1722 | "If rerun_failed_tasks is used, backfill "
|
1716 | 1723 | "will auto re-run the previous failed task instances"
|
1717 | 1724 | " within the backfill date range.",
|
|
0 commit comments