Browse Source

Minor documentation tweaks for broken links (#4770)

* Minor doc tweaks to broken links

Some internal documentation link references were broken. For example,
the `app` parameter in [celery.schedules documentation](http://docs.celeryproject.org/en/master/reference/celery.schedules.html#celery-schedules) links to ~@Celery,
which in the browser attempts to open an email client. Alternatively,
the [tasks userguide](http://docs.celeryproject.org/en/master/userguide/tasks.html#automatic-retry-for-known-exceptions) was also suffering from a similar reference error,
but in this case, produces no hyperlink.

* Update two more broken hyperlink instances

* Internal `AsyncResult` argument parameter
* `datetime` reference in celery.schedules nowfun
  paramater description
Juan Gutierrez 6 years ago
parent
commit
eeda18611c
5 changed files with 10 additions and 10 deletions
  1. 1 1
      celery/app/base.py
  2. 2 2
      celery/app/task.py
  3. 1 1
      celery/bin/base.py
  4. 3 3
      celery/schedules.py
  5. 3 3
      docs/userguide/tasks.rst

+ 1 - 1
celery/app/base.py

@@ -699,7 +699,7 @@ class Celery(object):
 
         Arguments:
             name (str): Name of task to call (e.g., `"tasks.add"`).
-            result_cls (~@AsyncResult): Specify custom result class.
+            result_cls (AsyncResult): Specify custom result class.
         """
         parent = have_parent = None
         amqp = self.amqp

+ 2 - 2
celery/app/task.py

@@ -471,10 +471,10 @@ class Task(object):
                 :func:`kombu.compression.register`.
                 Defaults to the :setting:`task_compression` setting.
 
-            link (~@Signature): A single, or a list of tasks signatures
+            link (Signature): A single, or a list of tasks signatures
                 to apply if the task returns successfully.
 
-            link_error (~@Signature): A single, or a list of task signatures
+            link_error (Signature): A single, or a list of task signatures
                 to apply if an error occurs while executing the task.
 
             producer (kombu.Producer): custom producer to use when publishing

+ 1 - 1
celery/bin/base.py

@@ -144,7 +144,7 @@ class Command(object):
     """Base class for command-line applications.
 
     Arguments:
-        app (~@Celery): The app to use.
+        app (Celery): The app to use.
         get_app (Callable): Fucntion returning the current app
             when no app provided.
     """

+ 3 - 3
celery/schedules.py

@@ -113,8 +113,8 @@ class schedule(BaseSchedule):
         relative (bool):  If set to True the run time will be rounded to the
             resolution of the interval.
         nowfun (Callable): Function returning the current date and time
-            (class:`~datetime.datetime`).
-        app (~@Celery): Celery app instance.
+            (:class:`~datetime.datetime`).
+        app (Celery): Celery app instance.
     """
 
     relative = False
@@ -689,7 +689,7 @@ class solar(BaseSchedule):
         lon (int): The longitude of the observer.
         nowfun (Callable): Function returning the current date and time
             as a class:`~datetime.datetime`.
-        app (~@Celery): Celery app instance.
+        app (Celery): Celery app instance.
     """
 
     _all_events = {

+ 3 - 3
docs/userguide/tasks.rst

@@ -707,7 +707,7 @@ Sometimes you just want to retry a task whenever a particular exception
 is raised.
 
 Fortunately, you can tell Celery to automatically retry a task using
-`autoretry_for` argument in `~@Celery.task` decorator:
+`autoretry_for` argument in the :meth:`~@Celery.task` decorator:
 
 .. code-block:: python
 
@@ -717,8 +717,8 @@ Fortunately, you can tell Celery to automatically retry a task using
     def refresh_timeline(user):
         return twitter.refresh_timeline(user)
 
-If you want to specify custom arguments for internal `~@Task.retry`
-call, pass `retry_kwargs` argument to `~@Celery.task` decorator:
+If you want to specify custom arguments for an internal :meth:`~@Task.retry`
+call, pass `retry_kwargs` argument to :meth:`~@Celery.task` decorator:
 
 .. code-block:: python