Skip to content

Commit

Permalink
Fixes documentation build
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Oct 23, 2014
1 parent ca3ee9e commit 6df0f36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion celery/app/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def apply_async(self, args=None, kwargs=None, task_id=None, producer=None,
:keyword link_error: A single, or a list of tasks to apply
if an error occurs while executing the task.
:keyword producer: :class:`~@kombu.Producer` instance to use.
:keyword producer: :class:`kombu.Producer` instance to use.
:keyword add_to_parent: If set to True (default) and the task
is applied while executing another task, then the result
will be appended to the parent tasks ``request.children``
Expand Down
2 changes: 1 addition & 1 deletion celery/task/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_publisher(self, connection=None, exchange=None,
exchange_type=None, **options):
"""Deprecated method to get the task publisher (now called producer).
Should be replaced with :class:`@kombu.Producer`:
Should be replaced with :class:`kombu.Producer`:
.. code-block:: python
Expand Down
9 changes: 6 additions & 3 deletions docs/_ext/celerydocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ def shorten(S, newtarget, src_dict):
return S


def get_abbr(pre, rest, type):
def get_abbr(pre, rest, type, orig=None):
if pre:
for d in APPATTRS, ABBRS:
try:
return d[pre], rest, d
except KeyError:
pass
raise KeyError(pre)
raise KeyError('Unknown abbreviation: {0} ({1})'.format(
'.'.join([pre, rest]) if orig is None else orig, type,
))
else:
for d in APPATTRS, ABBRS:
try:
Expand All @@ -83,14 +85,15 @@ def get_abbr(pre, rest, type):


def resolve(S, type):
orig = S
if S.startswith('@'):
S = S.lstrip('@-')
try:
pre, rest = S.split('.', 1)
except ValueError:
pre, rest = '', S

target, rest, src = get_abbr(pre, rest, type)
target, rest, src = get_abbr(pre, rest, type, orig)
return '.'.join([target, rest]) if rest else target, src
return S, None

Expand Down

0 comments on commit 6df0f36

Please sign in to comment.