Skip to content

Commit

Permalink
[AIRFLOW-649] Support non-sched DAGs in LatestOnlyOp
Browse files Browse the repository at this point in the history
Closes apache#1956 from r39132/master
  • Loading branch information
r39132 committed Dec 22, 2016
1 parent edf55cd commit 3cec728
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions airflow/operators/latest_only_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class LatestOnlyOperator(BaseOperator):
ui_color = '#e9ffdb' # nyanza

def execute(self, context):
# If the DAG Run is externally triggered, then return without
# skipping downstream tasks
if context['dag_run'].external_trigger:
logging.info("""Externally triggered DAG_Run:
allowing execution to proceed.""")
return

now = datetime.datetime.now()
left_window = context['dag'].following_schedule(
context['execution_date'])
Expand Down

0 comments on commit 3cec728

Please sign in to comment.