[AIRFLOW-1317] Fix minor issues in API reference
This commit is contained in:
Родитель
d8891d906c
Коммит
1ae7e5b9af
|
@ -13,7 +13,6 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from random import random
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import dateutil
|
import dateutil
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -1239,6 +1239,7 @@ class TaskInstance(Base):
|
||||||
def get_dagrun(self, session):
|
def get_dagrun(self, session):
|
||||||
"""
|
"""
|
||||||
Returns the DagRun for this TaskInstance
|
Returns the DagRun for this TaskInstance
|
||||||
|
|
||||||
:param session:
|
:param session:
|
||||||
:return: DagRun
|
:return: DagRun
|
||||||
"""
|
"""
|
||||||
|
@ -2684,7 +2685,7 @@ class DAG(BaseDag, LoggingMixin):
|
||||||
:param orientation: Specify DAG orientation in graph view (LR, TB, RL, BT)
|
:param orientation: Specify DAG orientation in graph view (LR, TB, RL, BT)
|
||||||
:type orientation: string
|
:type orientation: string
|
||||||
:param catchup: Perform scheduler catchup (or only run latest)? Defaults to True
|
:param catchup: Perform scheduler catchup (or only run latest)? Defaults to True
|
||||||
"type catchup: bool"
|
:type catchup: bool
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -2989,6 +2990,7 @@ class DAG(BaseDag, LoggingMixin):
|
||||||
"""
|
"""
|
||||||
Returns the dag run for a given execution date if it exists, otherwise
|
Returns the dag run for a given execution date if it exists, otherwise
|
||||||
none.
|
none.
|
||||||
|
|
||||||
:param execution_date: The execution date of the DagRun to find.
|
:param execution_date: The execution date of the DagRun to find.
|
||||||
:param session:
|
:param session:
|
||||||
:return: The DagRun if found, otherwise None.
|
:return: The DagRun if found, otherwise None.
|
||||||
|
@ -3093,6 +3095,7 @@ class DAG(BaseDag, LoggingMixin):
|
||||||
|
|
||||||
Heavily inspired by:
|
Heavily inspired by:
|
||||||
http://blog.jupo.org/2012/04/06/topological-sorting-acyclic-directed-graphs/
|
http://blog.jupo.org/2012/04/06/topological-sorting-acyclic-directed-graphs/
|
||||||
|
|
||||||
:return: list of tasks in topological order
|
:return: list of tasks in topological order
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -3479,7 +3482,6 @@ class DAG(BaseDag, LoggingMixin):
|
||||||
|
|
||||||
:param dag: the DAG object to save to the DB
|
:param dag: the DAG object to save to the DB
|
||||||
:type dag: DAG
|
:type dag: DAG
|
||||||
:own
|
|
||||||
:param sync_time: The time that the DAG should be marked as sync'ed
|
:param sync_time: The time that the DAG should be marked as sync'ed
|
||||||
:type sync_time: datetime
|
:type sync_time: datetime
|
||||||
:return: None
|
:return: None
|
||||||
|
|
|
@ -405,6 +405,7 @@ class HdfsSensor(BaseSensorOperator):
|
||||||
def filter_for_filesize(result, size=None):
|
def filter_for_filesize(result, size=None):
|
||||||
"""
|
"""
|
||||||
Will test the filepath result and test if its size is at least self.filesize
|
Will test the filepath result and test if its size is at least self.filesize
|
||||||
|
|
||||||
:param result: a list of dicts returned by Snakebite ls
|
:param result: a list of dicts returned by Snakebite ls
|
||||||
:param size: the file size in MB a file should be at least to trigger True
|
:param size: the file size in MB a file should be at least to trigger True
|
||||||
:return: (bool) depending on the matching criteria
|
:return: (bool) depending on the matching criteria
|
||||||
|
@ -420,10 +421,11 @@ class HdfsSensor(BaseSensorOperator):
|
||||||
def filter_for_ignored_ext(result, ignored_ext, ignore_copying):
|
def filter_for_ignored_ext(result, ignored_ext, ignore_copying):
|
||||||
"""
|
"""
|
||||||
Will filter if instructed to do so the result to remove matching criteria
|
Will filter if instructed to do so the result to remove matching criteria
|
||||||
|
|
||||||
:param result: (list) of dicts returned by Snakebite ls
|
:param result: (list) of dicts returned by Snakebite ls
|
||||||
:param ignored_ext: (list) of ignored extentions
|
:param ignored_ext: (list) of ignored extentions
|
||||||
:param ignore_copying: (bool) shall we ignore ?
|
:param ignore_copying: (bool) shall we ignore ?
|
||||||
:return:
|
:return: (list) of dicts which were not removed
|
||||||
"""
|
"""
|
||||||
if ignore_copying:
|
if ignore_copying:
|
||||||
regex_builder = "^.*\.(%s$)$" % '$|'.join(ignored_ext)
|
regex_builder = "^.*\.(%s$)$" % '$|'.join(ignored_ext)
|
||||||
|
|
|
@ -145,13 +145,13 @@ Variable Description
|
||||||
key within the JSON object
|
key within the JSON object
|
||||||
``{{ task_instance_key_str }}`` a unique, human-readable key to the task instance
|
``{{ task_instance_key_str }}`` a unique, human-readable key to the task instance
|
||||||
formatted ``{dag_id}_{task_id}_{ds}``
|
formatted ``{dag_id}_{task_id}_{ds}``
|
||||||
``conf`` the full configuration object located at
|
``{{ conf }}`` the full configuration object located at
|
||||||
``airflow.configuration.conf`` which
|
``airflow.configuration.conf`` which
|
||||||
represents the content of your
|
represents the content of your
|
||||||
``airflow.cfg``
|
``airflow.cfg``
|
||||||
``run_id`` the ``run_id`` of the current DAG run
|
``{{ run_id }}`` the ``run_id`` of the current DAG run
|
||||||
``dag_run`` a reference to the DagRun object
|
``{{ dag_run }}`` a reference to the DagRun object
|
||||||
``test_mode`` whether the task instance was called using
|
``{{ test_mode }}`` whether the task instance was called using
|
||||||
the CLI's test subcommand
|
the CLI's test subcommand
|
||||||
================================= ====================================
|
================================= ====================================
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче