You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/09/05 17:14:58 UTC

[GitHub] r39132 closed pull request #3846: [AIRFLOW-3006] Fix issue with schedule_interval='None'

r39132 closed pull request #3846: [AIRFLOW-3006] Fix issue with schedule_interval='None'
URL: https://github.com/apache/incubator-airflow/pull/3846
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/models.py b/airflow/models.py
index 02ad0a24c9..d9d9552b48 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -2313,6 +2313,7 @@ class derived from this one results in the creation of a task object,
     :type on_failure_callback: callable
     :param on_retry_callback: much like the ``on_failure_callback`` except
         that it is executed when retries occur.
+    :type on_retry_callback: callable
     :param on_success_callback: much like the ``on_failure_callback`` except
         that it is executed when the task succeeds.
     :type on_success_callback: callable
diff --git a/docs/scheduler.rst b/docs/scheduler.rst
index 3e895898fc..53d52dd7c7 100644
--- a/docs/scheduler.rst
+++ b/docs/scheduler.rst
@@ -63,6 +63,8 @@ use one of these cron "preset":
 | ``@yearly``  | Run once a year at midnight of January 1                       | ``0 0 1 1 *`` |
 +--------------+----------------------------------------------------------------+---------------+
 
+**Note**: Use ``schedule_interval=None`` and not ``schedule_interval='None'`` when
+you don't want to schedule your DAG.
 
 Your DAG will be instantiated
 for each schedule, while creating a ``DAG Run`` entry for each schedule.
diff --git a/tests/models.py b/tests/models.py
index 22340b05a2..4cbfdaec7b 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -65,7 +65,7 @@
 
 class DagTest(unittest.TestCase):
 
-    def test_parms_not_passed_is_empty_dict(self):
+    def test_params_not_passed_is_empty_dict(self):
         """
         Test that when 'params' is _not_ passed to a new Dag, that the params
         attribute is set to an empty dictionary.
@@ -311,7 +311,6 @@ def test_dag_task_priority_weight_total(self):
             with self.assertRaises(AirflowException):
                 DummyOperator(task_id='should_fail', weight_rule='no rule')
 
-
     def test_get_num_task_instances(self):
         test_dag_id = 'test_get_num_task_instances_dag'
         test_task_id = 'task_1'
@@ -595,6 +594,7 @@ def test_dagstats_crud(self):
         for stat in res:
             self.assertFalse(stat.dirty)
 
+
 class DagRunTest(unittest.TestCase):
 
     def create_dag_run(self, dag,
@@ -985,6 +985,7 @@ def with_all_tasks_removed(dag):
         flaky_ti.refresh_from_db()
         self.assertEquals(State.NONE, flaky_ti.state)
 
+
 class DagBagTest(unittest.TestCase):
 
     def test_get_existing_dag(self):
@@ -1457,6 +1458,7 @@ def test_kill_zombies(self, mock_ti):
                                    configuration.getboolean('core', 'unit_test_mode'),
                                    ANY)
 
+
 class TaskInstanceTest(unittest.TestCase):
 
     def test_set_task_dates(self):
@@ -2474,6 +2476,7 @@ def test_xcom_get_many(self):
         for result in results:
             self.assertEqual(result.value, json_obj)
 
+
 class ConnectionTest(unittest.TestCase):
     @patch.object(configuration, 'get')
     def test_connection_extra_no_encryption(self, mock_get):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services