Skip to content

Commit

Permalink
Fix mistake and typos in doc/docstrings (#15180)
Browse files Browse the repository at this point in the history
- Fix an apparent mistake in doc relating to catchup
- Fix typo pickable (should be picklable)
  • Loading branch information
XD-DENG authored Apr 4, 2021
1 parent b3b4125 commit 53dafa5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/apache/hive/hooks/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def __init__(self, metastore_conn_id: str = default_conn_name) -> None:

def __getstate__(self) -> Dict[str, Any]:
# This is for pickling to work despite the thrift hive client not
# being pickable
# being picklable
state = dict(self.__dict__)
del state['metastore']
return state
Expand Down
4 changes: 2 additions & 2 deletions airflow/utils/timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def utcnow() -> dt.datetime:
:return:
"""
# pendulum utcnow() is not used as that sets a TimezoneInfo object
# instead of a Timezone. This is not pickable and also creates issues
# instead of a Timezone. This is not picklable and also creates issues
# when using replace()
result = dt.datetime.utcnow()
result = result.replace(tzinfo=utc)
Expand All @@ -71,7 +71,7 @@ def utc_epoch() -> dt.datetime:
:return:
"""
# pendulum utcnow() is not used as that sets a TimezoneInfo object
# instead of a Timezone. This is not pickable and also creates issues
# instead of a Timezone. This is not picklable and also creates issues
# when using replace()
result = dt.datetime(1970, 1, 1)
result = result.replace(tzinfo=utc)
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/dag-run.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ An Airflow DAG with a ``start_date``, possibly an ``end_date``, and a ``sched
series of intervals which the scheduler turns into individual DAG Runs and executes. The scheduler, by default, will
kick off a DAG Run for any interval that has not been run since the last execution date (or has been cleared). This concept is called Catchup.

If your DAG is written to handle its catchup (i.e., not limited to the interval, but instead to ``Now`` for instance.),
If your DAG is not written to handle its catchup (i.e., not limited to the interval, but instead to ``Now`` for instance.),
then you will want to turn catchup off. This can be done by setting ``catchup = False`` in DAG or ``catchup_by_default = False``
in the configuration file. When turned off, the scheduler creates a DAG run only for the latest interval.

Expand Down

0 comments on commit 53dafa5

Please sign in to comment.