Skip to content

Commit

Permalink
[AIRFLOW-3030] Fix CLI docs (#3872)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil committed Sep 15, 2018
1 parent bbdce6f commit e19a015
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions airflow/bin/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@

log = LoggingMixin().log

DAGS_FOLDER = settings.DAGS_FOLDER

if "BUILDING_AIRFLOW_DOCS" in os.environ:
DAGS_FOLDER = '[AIRFLOW_HOME]/dags'


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

def process_subdir(subdir):
if subdir:
subdir = subdir.replace('DAGS_FOLDER', settings.DAGS_FOLDER)
subdir = subdir.replace('DAGS_FOLDER', DAGS_FOLDER)
subdir = os.path.abspath(os.path.expanduser(subdir))
return subdir

Expand Down Expand Up @@ -1310,8 +1315,10 @@ class CLIFactory(object):
"The regex to filter specific task_ids to backfill (optional)"),
'subdir': Arg(
("-sd", "--subdir"),
"File location or directory from which to look for the dag",
default=settings.DAGS_FOLDER),
"File location or directory from which to look for the dag. "
"Defaults to '[AIRFLOW_HOME]/dags' where [AIRFLOW_HOME] is the "
"value you set for 'AIRFLOW_HOME' config you set in 'airflow.cfg' ",
default=DAGS_FOLDER),
'start_date': Arg(
("-s", "--start_date"), "Override start_date YYYY-MM-DD",
type=parsedate),
Expand Down Expand Up @@ -1711,7 +1718,7 @@ class CLIFactory(object):
"If reset_dag_run option is used,"
" backfill will first prompt users whether airflow "
"should clear all the previous dag_run and task_instances "
"within the backfill date range."
"within the backfill date range. "
"If rerun_failed_tasks is used, backfill "
"will auto re-run the previous failed task instances"
" within the backfill date range.",
Expand Down

0 comments on commit e19a015

Please sign in to comment.