Skip to content

Commit aafbf63

Browse files
kaxilgalak75
authored andcommitted
[AIRFLOW-3030] Fix CLI docs (apache#3872)
1 parent 58e6be2 commit aafbf63

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

airflow/bin/cli.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080

8181
log = LoggingMixin().log
8282

83+
DAGS_FOLDER = settings.DAGS_FOLDER
84+
85+
if "BUILDING_AIRFLOW_DOCS" in os.environ:
86+
DAGS_FOLDER = '[AIRFLOW_HOME]/dags'
87+
8388

8489
def sigint_handler(sig, frame):
8590
sys.exit(0)
@@ -133,7 +138,7 @@ def setup_locations(process, pid=None, stdout=None, stderr=None, log=None):
133138

134139
def process_subdir(subdir):
135140
if subdir:
136-
subdir = subdir.replace('DAGS_FOLDER', settings.DAGS_FOLDER)
141+
subdir = subdir.replace('DAGS_FOLDER', DAGS_FOLDER)
137142
subdir = os.path.abspath(os.path.expanduser(subdir))
138143
return subdir
139144

@@ -1310,8 +1315,10 @@ class CLIFactory(object):
13101315
"The regex to filter specific task_ids to backfill (optional)"),
13111316
'subdir': Arg(
13121317
("-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),
13151322
'start_date': Arg(
13161323
("-s", "--start_date"), "Override start_date YYYY-MM-DD",
13171324
type=parsedate),
@@ -1711,7 +1718,7 @@ class CLIFactory(object):
17111718
"If reset_dag_run option is used,"
17121719
" backfill will first prompt users whether airflow "
17131720
"should clear all the previous dag_run and task_instances "
1714-
"within the backfill date range."
1721+
"within the backfill date range. "
17151722
"If rerun_failed_tasks is used, backfill "
17161723
"will auto re-run the previous failed task instances"
17171724
" within the backfill date range.",

0 commit comments

Comments
 (0)